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

[Freeciv-Dev] (PR#15222) memory leak in handle_options_settable

[Top] [All Lists]

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

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

==1743== 12,155 (12,123 direct, 32 indirect) bytes in 9 blocks are 
definitely lost in loss record 153 of 176
==1743==    at 0x401B41A: malloc (vg_replace_malloc.c:149)
==1743==    by 0x8099923: fc_real_malloc (mem.c:82)
==1743==    by 0x8099A73: real_mystrdup (mem.c:139)
==1743==    by 0x807E5C6: handle_options_settable (repodlgs_common.c:283)
==1743==    by 0x807CA83: client_handle_packet (packhand_gen.c:316)
==1743==    by 0x8059C21: handle_packet_input (civclient.c:421)
==1743==    by 0x805DD7D: input_from_server (clinet.c:377)
==1743==    by 0x812B16E: get_net_input (gui_main.c:1689)
==1743==    by 0x4344F9D: ??? (gdkevents.c:968)
==1743==    by 0x4644B96: (within /usr/lib/libglib-2.0.so.0.800.5)
==1743==    by 0x461B370: g_main_context_dispatch (in 
/usr/lib/libglib-2.0.so.0.800.5)
==1743==    by 0x461E5D6: (within /usr/lib/libglib-2.0.so.0.800.5)

Not sure how this happens...it must be from the server sending the same 
settable option twice.  The obvious solution is to free any existing 
option data inside handle_options_settable.

P.S.  handle_options_settable is an odd name since it is one (singular) 
option that it contains.

-jason





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