Opened 11 years ago

Closed 10 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)

in reply to:  description comment:1 by glynn, 11 years ago

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 by neteler, 11 years ago

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 by neteler, 10 years ago

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.