Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2006:
[Freeciv-Dev] (PR#15223) memory leak in get_tileset_list
Home

[Freeciv-Dev] (PR#15223) memory leak in get_tileset_list

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#15223) memory leak in get_tileset_list
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 20 Jan 2006 00:21:53 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=15223 >

Pretty trivial.

==1743== 64 bytes in 1 blocks are definitely lost in loss record 72 of 176
==1743==    at 0x401C7E8: realloc (vg_replace_malloc.c:306)
==1743==    by 0x80999B4: fc_real_realloc (mem.c:104)
==1743==    by 0x809EC36: datafilelist (shared.c:1020)
==1743==    by 0x808660E: get_tileset_list (tilespec.c:664)
==1743==    by 0x814DC90: popup_option_dialog (gamedlgs.c:553)
==1743==    by 0x8135F93: game_menu_callback (menu.c:208)
==1743==    by 0x414C3C7: ??? (gtkitemfactory.c:236)
==1743==    by 0x45CB6CA: g_cclosure_marshal_VOID__VOID (in 
/usr/lib/libgobject-2.0.so.0.800.5)
==1743==    by 0x45BF6AA: g_closure_invoke (in 
/usr/lib/libgobject-2.0.so.0.800.5)
==1743==    by 0x45CECBC: (within /usr/lib/libgobject-2.0.so.0.800.5)
==1743==    by 0x45D0096: g_signal_emit_valist (in 
/usr/lib/libgobject-2.0.so.0.800.5)
==1743==    by 0x45D044D: g_signal_emit (in 
/usr/lib/libgobject-2.0.so.0.800.5)

-jason

Index: client/tilespec.c
===================================================================
--- client/tilespec.c   (revision 11490)
+++ client/tilespec.c   (working copy)
@@ -676,6 +676,7 @@
        free(list[i]);
       }
     }
+    free(list);
 
     tilesets = fc_realloc(tilesets, (count + 1) * sizeof(*tilesets));
     tilesets[count] = NULL;

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#15223) memory leak in get_tileset_list, Jason Short <=