[GRASS-dev] [GRASS GIS] #2063: Memory leak in Rast_read_color_rules() ?

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


#2063: Memory leak in Rast_read_color_rules() ?
-------------------------+--------------------------------------------------
 Reporter:  sprice       |       Owner:  grass-dev@…              
     Type:  defect       |      Status:  new                      
 Priority:  normal       |   Milestone:  7.0.0                    
Component:  Default      |     Version:  unspecified              
 Keywords:               |    Platform:  Unspecified              
      Cpu:  Unspecified  |  
-------------------------+--------------------------------------------------
 I was looking for memory leaks in my program and I think I found one in
 Rast_read_color_rules() (if I'm reading it correctly).

 http://grass.osgeo.org/programming7/raster_2color__rules_8c_source.html

 On line 224 you see G_realloc() called, but no calls to G_free() anywhere.
 If I'm reading it correctly, you should insert G_free() at line 254 (or
 later).

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



More information about the grass-dev mailing list