Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#5541 closed defect (fixed)

MSG Driver: two memory leaks

Reported by: cauthmann Owned by: warmerdam
Priority: normal Milestone: 2.0.0
Component: GDAL_Raster Version: svn-trunk
Severity: normal Keywords:



valgrind'ing my application revealed two memory leaks in msgdataset.cpp.

a) MSGDataset::pszProjection shall always point to a valid string during the lifetime of the object; the old string needs to be released before getting a new one from exportToWkt().

b) A spatial reference is exported to a temporary string as WKT, but the string is never released.

Attached you'll find a patch fixing both; valgrind confirms that both memory leaks are gone.

Attachments (1)

msgdataset_memoryleaks.patch (1.2 KB) - added by cauthmann 7 years ago.

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by cauthmann

comment:1 Changed 7 years ago by Even Rouault

Milestone: 2.0
Resolution: fixed
Status: newclosed

trunk r27477 "MSG: fix memory leaks (patch by cauthmann, #5541)"

comment:2 Changed 6 years ago by Even Rouault


Milestone renamed

Note: See TracTickets for help on using tickets.