GNOME Bugzilla – Bug 709665
No warning when assigning string*[] value to string[] variable
Last modified: 2017-03-22 09:36:39 UTC
If you assign a string*[] value to a string[] variable, e.g. with: string[] my_variable = my_g_variant.get_strv(); there is no warning, but Vala generates C code to free every member of the array. Looking at the type and documentation for Variant.get_strv(), this is incorrect, and results in double-frees of every member of the array. Vala should throw a type error if the user attempts such an assignment. This is with Vala 75359c3cab2e979d087ce0a19735bf86add33b42.
0.28+ produces working c-code.