mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-03 14:42:10 +01:00
Plug a mem leak in g-file-info test
==2395== 64 bytes in 1 blocks are definitely lost in loss record 381 of 407 ==2395== at 0x4005BDC: malloc (vg_replace_malloc.c:195) ==2395== by 0x4005C66: realloc (vg_replace_malloc.c:476) ==2395== by 0x40571A5: g_realloc (gmem.c:181) ==2395== by 0x401D670: g_ptr_array_maybe_expand (garray.c:968) ==2395== by 0x401DD0B: g_ptr_array_add (garray.c:1225) ==2395== by 0x4199AA9: g_file_info_list_attributes (gfileinfo.c:646) ==2395== by 0x80491CE: test_g_file_info (g-file-info.c:76) ==2395== 132 (64 direct, 68 indirect) bytes in 1 blocks are definitely lost in loss record 396 of 407 ==2395== at 0x4005BDC: malloc (vg_replace_malloc.c:195) ==2395== by 0x4005C66: realloc (vg_replace_malloc.c:476) ==2395== by 0x40571A5: g_realloc (gmem.c:181) ==2395== by 0x401D670: g_ptr_array_maybe_expand (garray.c:968) ==2395== by 0x401DD0B: g_ptr_array_add (garray.c:1225) ==2395== by 0x4199A82: g_file_info_list_attributes (gfileinfo.c:642) ==2395== by 0x80492B7: test_g_file_info (g-file-info.c:86) Bug #628331.
This commit is contained in:
parent
35e101fa0a
commit
d5d277dccf
@ -76,6 +76,7 @@ test_g_file_info (void)
|
||||
attr_list = g_file_info_list_attributes (info, NULL);
|
||||
g_assert (attr_list != NULL);
|
||||
g_assert (*attr_list == NULL);
|
||||
g_strfreev (attr_list);
|
||||
|
||||
g_file_info_set_attribute_byte_string (info, G_FILE_ATTRIBUTE_STANDARD_NAME, TEST_NAME);
|
||||
g_file_info_set_attribute_string (info, G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME, TEST_DISPLAY_NAME);
|
||||
@ -86,6 +87,7 @@ test_g_file_info (void)
|
||||
attr_list = g_file_info_list_attributes (info, NULL);
|
||||
g_assert (attr_list != NULL);
|
||||
g_assert (*attr_list != NULL);
|
||||
g_strfreev (attr_list);
|
||||
|
||||
test_assigned_values (info);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user