MapServer / MapServer-import

3 stars 2 forks source link

memory leaks from msInsertLayer #841

Open tbonfort opened 12 years ago

tbonfort commented 12 years ago

Reporter: sgillies@frii.com Date: 2004/09/01 - 02:01

Inserting a layer into a mapObj results in largish memory leaks

==5329== 1148 bytes in 7 blocks are definitely lost in loss record 73 of 88
==5329==    at 0x1B904A80: malloc (vg_replace_malloc.c:131)
==5329==    by 0x1C004D5F: initHashTable (maphash.c:35)
==5329==    by 0x1C011819: initClass (mapfile.c:1592)
==5329==    by 0x1C056FA5: msCopyLayer (mapcopy.c:668)
==5329==    by 0x1C067F22: msInsertLayer (mapobject.c:454)
==5329==    by 0x1BFCDC4C: mapObj_insertLayer (mapscript_wrap.c:1313)
==5329==    by 0x1BFECA81: _wrap_mapObj_insertLayer (mapscript_wrap.c:16433)
==5329==    by 0x80EA40C: PyCFunction_Call (in /usr/bin/python)
==5329==    by 0x805B3B6: PyObject_Call (in /usr/bin/python)
==5329==    by 0x80AB92A: (within /usr/bin/python)
==5329==    by 0x80A93C7: (within /usr/bin/python)
==5329==    by 0x80A9B5D: PyEval_EvalCodeEx (in /usr/bin/python)
==5329== 
...
==5329== 
==5329== 3920 bytes in 7 blocks are definitely lost in loss record 80 of 88
==5329==    at 0x1B904A80: malloc (vg_replace_malloc.c:131)
==5329==    by 0x1C01183E: initClass (mapfile.c:1597)
==5329==    by 0x1C056FA5: msCopyLayer (mapcopy.c:668)
==5329==    by 0x1C067F22: msInsertLayer (mapobject.c:454)
==5329==    by 0x1BFCDC4C: mapObj_insertLayer (mapscript_wrap.c:1313)
==5329==    by 0x1BFECA81: _wrap_mapObj_insertLayer (mapscript_wrap.c:16433)
==5329==    by 0x80EA40C: PyCFunction_Call (in /usr/bin/python)
==5329==    by 0x805B3B6: PyObject_Call (in /usr/bin/python)
==5329==    by 0x80AB92A: (within /usr/bin/python)
==5329==    by 0x80A93C7: (within /usr/bin/python)
==5329==    by 0x80A9B5D: PyEval_EvalCodeEx (in /usr/bin/python)
==5329==    by 0x80AB34B: (within /usr/bin/python)
tbonfort commented 12 years ago

Author: sgillies@frii.com Date: 2004/09/27 - 00:34

the big leaks are fixed, we still have a lingering 524 byte leak from
creation of layerObj.  Something is not being freed.
tbonfort commented 12 years ago

Author: sgillies@frii.com Date: 2004/09/27 - 20:31

Got it.  Case closed.