[gdal-dev] MSG Driver: two memory leaks

Simon Richard Proud srp at geo.ku.dk
Thu Jun 26 07:14:03 PDT 2014


Hi,
Have you noticed any other memory leaks in the MSG driver? We have seen some huge memory uses when working with the visible MSG channels (converting from DN to Reflectance) but have not been able to track down where the memory is being used. Would be good to have a second opinion!

All the best,
Simon

________________________________________
Fra: gdal-dev-bounces at lists.osgeo.org [gdal-dev-bounces at lists.osgeo.org] på vegne af Christian Authmann [authmanc at Mathematik.Uni-Marburg.de]
Sendt: 26. juni 2014 05:23
Til: gdal-dev at lists.osgeo.org
Emne: [gdal-dev] MSG Driver: two memory leaks

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.


--
Christian Authmann
Philipps-Universität Marburg
Fachbereich Mathematik und Informatik
AG Datenbanksysteme
Hans-Meerwein-Straße
D-35032 Marburg


More information about the gdal-dev mailing list