Opened 6 years ago

Closed 6 years ago

#2063 closed defect (fixed)

Memory leak in Rast_read_color_rules() ?

Reported by: sprice Owned by: grass-dev@…
Priority: normal Milestone: 6.4.4
Component: Raster Version: svn-trunk
Keywords: libgis Cc:
CPU: Unspecified Platform: Unspecified

Description

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).

Change History (3)

comment:1 in reply to:  description Changed 6 years ago by glynn

Replying to sprice:

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).

Fixed in r57540.

comment:2 Changed 6 years ago by neteler

Component: DefaultRaster
Version: unspecifiedsvn-trunk

Diff'ing the updated file with the respective one in G6 it looks like a backport candidate. Backport it?

comment:3 Changed 6 years ago by neteler

Keywords: libgis added
Milestone: 7.0.06.4.4
Resolution: fixed
Status: newclosed

Backported in r59356 and r59357. Closing.

Note: See TracTickets for help on using tickets.