collection: Fix on_create_path() leak

This fixes:
==2111== 45 bytes in 1 blocks are definitely lost in loss record 1,180 of 1,795
==2111==    at 0x4C28C50: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==2111==    by 0x6002FCC: g_malloc (gmem.c:94)
==2111==    by 0x60032AE: g_malloc_n (gmem.c:330)
==2111==    by 0x601DBF0: g_strdup (gstrfuncs.c:363)
==2111==    by 0x603C073: g_variant_dup_string (gvariant.c:1503)
==2111==    by 0x4E644D5: on_create_collection_prompt (secret-paths.c:1682)
==2111==    by 0x5A1CB66: g_simple_async_result_complete (gsimpleasyncresult.c:801)
==2111==    by 0x4E5C12F: on_real_prompt_completed (secret-service.c:322)
==2111==    by 0x5A1CB66: g_simple_async_result_complete (gsimpleasyncresult.c:801)
==2111==    by 0x4E5A6A1: perform_prompt_complete (secret-prompt.c:288)
==2111==    by 0x4E5A7B5: on_prompt_completed (secret-prompt.c:314)
==2111==    by 0x5A97B7B: emit_signal_instance_in_idle_cb (gdbusconnection.c:3701)
==2111==    by 0x5FFD3D0: g_idle_dispatch (gmain.c:5441)
==2111==    by 0x5FFAA18: g_main_dispatch (gmain.c:3154)
==2111==    by 0x5FFB85C: g_main_context_dispatch (gmain.c:3769)
==2111==    by 0x5FFBA40: g_main_context_iterate (gmain.c:3840)
==2111==    by 0x5FFBE66: g_main_loop_run (gmain.c:4034)
==2111==    by 0x4E7C9E1: loop_wait_until (egg-testing.c:151)
==2111==    by 0x4E7C859: egg_test_wait_until (egg-testing.c:105)
==2111==    by 0x4032ED: test_create_async (test-collection.c:328)
==2111==    by 0x60258FA: test_case_run (gtestutils.c:2158)
==2111==    by 0x6025CBB: g_test_run_suite_internal (gtestutils.c:2241)
==2111==    by 0x6025D64: g_test_run_suite_internal (gtestutils.c:2253)
==2111==    by 0x6025F7B: g_test_run_suite (gtestutils.c:2328)
==2111==    by 0x6024C1C: g_test_run (gtestutils.c:1596)
==2111==    by 0x4E7CA3B: egg_tests_run_with_loop (egg-testing.c:167)
==2111==    by 0x406948: main (test-collection.c:1033)

https://bugzilla.gnome.org/show_bug.cgi?id=756766
This commit is contained in:
Christophe Fergeau 2015-10-17 23:12:36 +02:00
parent 91ee4c847d
commit d9f5479963

View File

@ -1012,6 +1012,7 @@ on_create_path (GObject *source,
} }
g_object_unref (res); g_object_unref (res);
g_free (path);
} }
static void static void