Opened 14 years ago

Closed 14 years ago

#3281 closed defect (fixed)

[PATCH] Fix memory leak in DXF writer

Reported by: Even Rouault Owned by: warmerdam
Priority: normal Milestone: 1.7.0
Component: OGR_SF Version: unspecified
Severity: normal Keywords: DXF
Cc:

Description

ogr2ogr -f DXF out.dxf assorted.dxf shows memory leaks.

One fix is obvious (missing CSLDestroy()). The other one is less. I propose to fix it by deleting the poTool object returned by oSM.GetPart(0), but I'm not clear if that matches the intended life cycle of this object. I suppose this is somewhat correct though as in MITAB's ITABFeaturePen::SetPenFromStyleString() it looks similar.

Attachments (1)

ogrdxfwriterlayer.cpp.patch (917 bytes ) - added by Even Rouault 14 years ago.

Download all attachments as: .zip

Change History (2)

by Even Rouault, 14 years ago

Attachment: ogrdxfwriterlayer.cpp.patch added

comment:1 by warmerdam, 14 years ago

Component: OGR_SRSOGR_SF
Resolution: fixed
Status: newclosed

I agree, fixes applied in trunk (r18298).

Note: See TracTickets for help on using tickets.