Opened 11 years ago

Closed 11 years ago

#4926 closed defect (fixed)

Mutex memory leaks after CPLSetErrorHandlerEx call

Reported by: Mateusz Łoskot Owned by: warmerdam
Priority: normal Milestone: 1.10.0
Component: default Version: svn-trunk
Severity: normal Keywords: memory, leak
Cc:

Description

When user calls CPLSetErrorHandlerEx to set custom handler, an implicit mutex hErrorMutex is acquired in cpl_error.cpp:170. This involves dynamic memory allocation.

It seems, the allocated memory is not released anywhere.

Perhaps, it could be triggered by user with call to CPLSetErrorHandlerEx( 0 ) or something similar.

Change History (2)

comment:1 by Mateusz Łoskot, 11 years ago

Related ticket #4928

comment:2 by Even Rouault, 11 years ago

Milestone: 1.10.0
Resolution: fixed
Status: newclosed

svn commit port/cpl_conv.cpp port/cpl_vsil.cpp port/cpl_multiproc.cpp port/cpl_multiproc.h port/cpl_conv.h ogr/ogr_srs_api.h ogr/ogrct.cpp ogr/ogrspatialreference.cpp frmts/gtiff/geotiff.cpp frmts/grib/gribdataset.cpp gcore/gdaldrivermanager.cpp gcore/gdalclientserver.cpp alg/gdal_alg_priv.h alg/gdaltransformer.cpp port/cpl_error.cpp port/cpl_error.h -m "Free various mutex in GDALDestroyDriverManager() (#4926, #4928, #4984)"

Note: See TracTickets for help on using tickets.