Opened 10 years ago

Closed 10 years ago

Last modified 9 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:
Cc:

Description

Hello,

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 10 years ago.

Download all attachments as: .zip

Change History (3)

by cauthmann, 10 years ago

comment:1 by Even Rouault, 10 years ago

Milestone: 2.0
Resolution: fixed
Status: newclosed

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

comment:2 by Even Rouault, 9 years ago

Milestone: 2.02.0.0

Milestone renamed

Note: See TracTickets for help on using tickets.