Fixed-size and Zero-terminated arrays are leaked when used as in or inout arguments with transfer none
Found while testing the cases in gobject-introspection!407
Especially in:
/**
* gi_marshalling_tests_zero_terminated_array_of_gstrv_transfer_none_in:
* @array: (array zero-terminated) (element-type GStrv) (transfer none):
*/
void
gi_marshalling_tests_zero_terminated_array_of_gstrv_transfer_none_in (GStrv *array)
{
GStrv g_strv;
g_strv = array[0];
g_assert_cmpint (g_strv_length (g_strv), ==, 3);
g_assert_cmpstr (g_strv[0], ==, "0");
g_assert_cmpstr (g_strv[1], ==, "1");
g_assert_cmpstr (g_strv[2], ==, "2");
g_strv = array[1];
g_assert_cmpint (g_strv_length (g_strv), ==, 3);
g_assert_cmpstr (g_strv[0], ==, "3");
g_assert_cmpstr (g_strv[1], ==, "4");
g_assert_cmpstr (g_strv[2], ==, "5");
g_strv = array[2];
g_assert_cmpint (g_strv_length (g_strv), ==, 3);
g_assert_cmpstr (g_strv[0], ==, "6");
g_assert_cmpstr (g_strv[1], ==, "7");
g_assert_cmpstr (g_strv[2], ==, "8");
g_assert_null (array[3]);
}
Edited by Marco Trevisan