URL:
  <http://gna.org/bugs/?21551>

                 Summary: genlist_sort() memory leak
                 Project: Freeciv
            Submitted by: pepeto
            Submitted on: mer. 29 janv. 2014 00:43:57 CET
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: Ready For Test
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
                 Release: S2_3,S2_4,S2_5,trunk
         Discussion Lock: Any
        Operating System: None
         Planned Release: 

    _______________________________________________________

Details:

I suspect patch #4326 to be the cause. Fix attached.

Valgrind report:

==6080== 1 bytes in 1 blocks are definitely lost in loss record 1 of 1,459
==6080==    at 0x4C2B6CD: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6080==    by 0x5EE5E1: fc_real_malloc (mem.c:84)
==6080==    by 0x5EC9F1: genlist_sort (genlist.c:626)
==6080==    by 0x4C82EB: settings_list_update (speclist.h:471)
==6080==    by 0x4355D7: srv_prepare (srv_main.c:2398)
==6080==    by 0x435A06: srv_main (srv_main.c:2742)
==6080==    by 0x42E851: main (civserver.c:453)
==6080== 
==6080== 1 bytes in 1 blocks are definitely lost in loss record 2 of 1,459
==6080==    at 0x4C2B6CD: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6080==    by 0x5EE5E1: fc_real_malloc (mem.c:84)
==6080==    by 0x5EC9F1: genlist_sort (genlist.c:626)
==6080==    by 0x4355D7: srv_prepare (srv_main.c:2398)
==6080==    by 0x435A06: srv_main (srv_main.c:2742)
==6080==    by 0x42E851: main (civserver.c:453)
==6080== 
==6080== 2 bytes in 2 blocks are definitely lost in loss record 3 of 1,459
==6080==    at 0x4C2B6CD: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6080==    by 0x5EE5E1: fc_real_malloc (mem.c:84)
==6080==    by 0x5EC9F1: genlist_sort (genlist.c:626)
==6080==    by 0x43AC10: show_command.isra.9 (stdinhand.c:2193)
==6080==    by 0x4455BC: read_init_script_real (stdinhand.c:2085)
==6080==    by 0x435A2A: srv_main (srv_main.c:2751)
==6080==    by 0x42E851: main (civserver.c:453)
==6080== 
==6080== 3 bytes in 3 blocks are definitely lost in loss record 4 of 1,459
==6080==    at 0x4C2B6CD: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6080==    by 0x5EE5E1: fc_real_malloc (mem.c:84)
==6080==    by 0x5EC9F1: genlist_sort (genlist.c:626)
==6080==    by 0x4C8820: settings_init (speclist.h:471)
==6080==    by 0x4355D7: srv_prepare (srv_main.c:2398)
==6080==    by 0x435A06: srv_main (srv_main.c:2742)
==6080==    by 0x42E851: main (civserver.c:453)





    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: mer. 29 janv. 2014 00:43:57 CET  Name: genlist_sort.diff  Size: 668 o  
By: pepeto

<http://gna.org/bugs/download.php?file_id=19883>

    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?21551>

_______________________________________________
  Message posté via/par Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to