From 2a73ff5e2f0b360342325424e6085dd9564d5286 Mon Sep 17 00:00:00 2001 From: Victor Toso Date: Tue, 15 Feb 2022 13:50:38 +0100 Subject: tree: Fix small leak of char * ==422112== 15 bytes in 1 blocks are definitely lost in loss record 216 of 2,333 ==422112== at 0x484486F: malloc (vg_replace_malloc.c:381) ==422112== by 0x4AEE9AF: __vasprintf_internal (vasprintf.c:71) ==422112== by 0x49B3812: g_vasprintf (in /usr/lib64/libglib-2.0.so.0.7000.3) ==422112== by 0x4989830: g_strdup_vprintf (in /usr/lib64/libglib-2.0.so.0.7000.3) ==422112== by 0x49898EC: g_strdup_printf (in /usr/lib64/libglib-2.0.so.0.7000.3) ==422112== by 0x488173F: load_keyinfo (osinfo_tree.c:597) ==422112== by 0x4032B2: test_create_from_treeinfo (test-tree.c:93) ==422112== by 0x4992BD5: ??? (in /usr/lib64/libglib-2.0.so.0.7000.3) ==422112== by 0x49928FA: ??? (in /usr/lib64/libglib-2.0.so.0.7000.3) ==422112== by 0x49930A9: g_test_run_suite (in /usr/lib64/libglib-2.0.so.0.7000.3) ==422112== by 0x49930D0: g_test_run (in /usr/lib64/libglib-2.0.so.0.7000.3) ==422112== by 0x402449: main (test-tree.c:206) Signed-off-by: Victor Toso --- osinfo/osinfo_tree.c | 1 + 1 file changed, 1 insertion(+) diff --git a/osinfo/osinfo_tree.c b/osinfo/osinfo_tree.c index 7e825b5..1f30094 100644 --- a/osinfo/osinfo_tree.c +++ b/osinfo/osinfo_tree.c @@ -613,6 +613,7 @@ static OsinfoTree *load_keyinfo(const gchar *location, goto cleanup; g_clear_error(error); } + g_clear_pointer(&group, g_free); } tree = osinfo_tree_new(location, arch ? arch : "i386"); -- cgit v1.2.1