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

                 Summary: memory leak in map_allocate
                 Project: Freeciv
            Submitted by: None
            Submitted on: Monday 02/08/2010 at 00:07 CET
                Category: general
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: jkl102...@yahoo.com
             Open/Closed: Open
                 Release: 
         Discussion Lock: Any
        Operating System: None
         Planned Release: 

    _______________________________________________________

Details:

The map_allocate function calls the two functions

generate_city_map_indices()

and

generate_map_indices()

which allocate memory.  As far as I can tell, there is no corresponding code
which frees that memory.  Attached is a patch which modifies map_free to
perform the deallocation.  In the patch, it was necessary to modify the
city.c code as well because the city_map_index symbol is static.

JKL



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Monday 02/08/2010 at 00:07 CET  Name: map_allocate_memory_leak.patch 
Size: 2kB   By: None

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

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


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

Reply via email to