]> git.ipfire.org Git - thirdparty/vala.git/commit
vala: Don't force array-elements to be owned, unowned ones are supported
authorRico Tzschichholz <ricotz@ubuntu.com>
Fri, 16 Sep 2016 14:54:21 +0000 (16:54 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Fri, 16 Sep 2016 15:03:49 +0000 (17:03 +0200)
commit2ee9d3f5e4af2e73b8bc5d26044ac40f68232b3d
tree4df9801efac207217d95e3a6c5db77aa17b76bc4
parent3592f2113f30d7f379c000c76f93da8556f0be4f
vala: Don't force array-elements to be owned, unowned ones are supported

Passing an (unowned string) array literal to a function causes the array
elements to be freed afterwards, even though they should not be. This
causes the array elements to be double freed. While assigning the literal
to an intermediate variable and passing that to the function masks this
error of the ArrayCreationExpression.

https://bugzilla.gnome.org/show_bug.cgi?id=761307
tests/Makefile.am
tests/basic-types/bug761307.vala [new file with mode: 0644]
vala/valaarraycreationexpression.vala