[gdal-dev] MSG Driver: two memory leaks
Christian Authmann
authmanc at Mathematik.Uni-Marburg.de
Thu Jun 26 07:45:39 PDT 2014
Hi,
I haven't noticed any other leaks, but I haven't used the Reflectance
Calculator, either. Should I stumble upon more leaks, I'll either report
or fix them.
If you want to know if the "memory usage" you noticed is just "usage" or
an actual leak, valgrind ( http://valgrind.org/ ) is awesome.
greetings,
Christian
On 26.06.2014 16:14, Simon Richard Proud wrote:
> 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
>
--
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