From 17e6a279586e08fd6f9bd21337ca647bed3b5ed6 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 2 Apr 2014 15:20:53 +0300 Subject: gobex: Fix memory leak This fixes the following leak introduced by the authentication patches: 16 bytes in 1 blocks are definitely lost in loss record 62 of 158 at 0x4C291D4: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x4E7FEC6: g_malloc0 (in /usr/lib64/libglib-2.0.so.0.3800.2) by 0x403226: prepare_auth_rsp.isra.4 (gobex.c:564) by 0x404DE4: handle_response (gobex.c:1015) by 0x405C7B: incoming_data (gobex.c:1351) by 0x4E7A2A5: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3800.2) by 0x4E7A627: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2) by 0x4E7AA39: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3800.2) by 0x40DC34: test_auth (test-gobex.c:966) by 0x4E9E5E0: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2) by 0x4E9E7A5: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2) by 0x4E9EB1A: g_test_run_suite (in /usr/lib64/libglib-2.0.so.0.3800.2) --- gobex/gobex.c | 1 + 1 file changed, 1 insertion(+) (limited to 'gobex') diff --git a/gobex/gobex.c b/gobex/gobex.c index 4185ed17c..053102d91 100644 --- a/gobex/gobex.c +++ b/gobex/gobex.c @@ -604,6 +604,7 @@ static void prepare_auth_rsp(GObex *obex, GObexPacket *rsp) g_obex_packet_add_header(rsp, hdr); g_obex_apparam_free(authrsp); + g_free(result); done: g_obex_apparam_free(obex->authchal); -- cgit v1.2.1