[glib] Plug mem leak in g_dbus_address_get_stream_sync



commit 5bc9d43288d4991b9c3ef1fc38d231113b633ec7
Author: Christian Persch <chpe gnome org>
Date:   Fri May 14 14:27:08 2010 +0200

    Plug mem leak in g_dbus_address_get_stream_sync
    
    ==6279== 21,615 (4,708 direct, 16,907 indirect) bytes in 169 blocks are
    definitely lost in loss record 12 of 13
    ==6279==    at 0x4024D2E: malloc (vg_replace_malloc.c:207)
    ==6279==    by 0x4079A90: g_malloc (gmem.c:135)
    ==6279==    by 0x4079DC8: g_malloc_n (gmem.c:252)
    ==6279==    by 0x4097E66: g_strsplit (gstrfuncs.c:2434)
    ==6279==    by 0x42169A2: g_dbus_address_get_stream_sync
    (gdbusaddress.c:875)
    
    Bug #618622.

 gio/gdbusaddress.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gio/gdbusaddress.c b/gio/gdbusaddress.c
index 5e3b87c..5d8fc9c 100644
--- a/gio/gdbusaddress.c
+++ b/gio/gdbusaddress.c
@@ -907,6 +907,8 @@ g_dbus_address_get_stream_sync (const gchar   *address,
       g_assert (last_error != NULL);
       g_propagate_error (error, last_error);
     }
+
+  g_strfreev (addr_array);
   return ret;
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]