Plug a mem leak
authorChristian Persch <chpe@gnome.org>
Mon, 30 Aug 2010 14:16:31 +0000 (10:16 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 30 Aug 2010 14:16:31 +0000 (10:16 -0400)
==6793== 19 (8 direct, 11 indirect) bytes in 1 blocks are definitely lost in loss record 640 of 1,423
==6793==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
==6793==    by 0x4057094: g_malloc (gmem.c:134)
==6793==    by 0x40573DB: g_malloc_n (gmem.c:281)
==6793==    by 0x4073D1B: g_strsplit (gstrfuncs.c:2436)
==6793==    by 0x4224A89: initable_init (gdbusserver.c:1040)
==6793==    by 0x41A73F9: g_initable_init (ginitable.c:105)
==6793==    by 0x41A759B: g_initable_new_valist (ginitable.c:218)
==6793==    by 0x41A743E: g_initable_new (ginitable.c:138)
==6793==    by 0x42238F5: g_dbus_server_new_sync (gdbusserver.c:484)

Bug #628328.

gio/gdbusserver.c

index f9e19b3..8fd1291 100644 (file)
@@ -1096,6 +1096,9 @@ initable_init (GInitable     *initable,
     goto out;
 
  out:
+
+  g_strfreev (addr_array);
+
   if (ret)
     {
       if (last_error != NULL)