Opened 9 years ago
Closed 8 years ago
#6129 closed defect (fixed)
dgnwrite.cpp memory leaks
Reported by: | Kurt Schwehr | Owned by: | Kurt Schwehr |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | default | Version: | svn-trunk |
Severity: | normal | Keywords: | memoryleak |
Cc: |
Description
The code in dgnwrite has a tendency to allocate an object and return just a portion of that memory. Coverity is noticing the leaked memor. However, it's not currently safe to just call CPLFree on the original object before returning the "core." There needs to be a new allocation and memory copy of the core that is returned.
See: r30679, r30678, r30677, r30676, r30675. and r30674.
Coverity:
- CID 1074357
- CID 1074358
- CID 1074359
- CID 1074360
Note:
See TracTickets
for help on using tickets.
trunk r31923 "DGN: fix Coverity false-positive warnings about memleaks (but admitedly this code is a bit tricky as it assumes the core member is in first position of the derived structures) (CID 1074354 to 1074360, #6129)"