[GRASS-dev] [GRASS GIS] #2064: Memory leak in write_support_files()

GRASS GIS trac at osgeo.org
Wed Aug 28 15:58:05 PDT 2013


#2064: Memory leak in write_support_files()
-------------------------+--------------------------------------------------
 Reporter:  sprice       |       Owner:  grass-dev@…              
     Type:  defect       |      Status:  new                      
 Priority:  normal       |   Milestone:  7.0.0                    
Component:  Default      |     Version:  unspecified              
 Keywords:               |    Platform:  Unspecified              
      Cpu:  Unspecified  |  
-------------------------+--------------------------------------------------
 write_support_files() calls Rast_short_history() & Rast_write_history().

 Rast_short_history() calls Rast_format_history() which calls G_vasprintf()
 which calls G_malloc(). But this memory is never freed after
 Rast_write_history().

 You should probably call Rast_free_history(), or
 G_free(hist->fields[HIST_KEYWRD]), at raster/close.c:191

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/2064>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list