Opened 16 years ago
Closed 15 years ago
#2584 closed defect (fixed)
Memory leak in msOracleSpatialLayerGetShape()
Reported by: | jimk | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 6.0 release |
Component: | Input - Native Oracle Spatial Support | Version: | 5.0 |
Severity: | normal | Keywords: | |
Cc: | sdlime, dmorissette |
Description
I found a memory leak in maporaclespatial.c in msOracleSpatialLayerGetShape that was preventing me from retrieving large datasets via WFS from an Oracle Spatial source.
layerinfo->items_query = (item_text_array_query *)malloc( sizeof(item_text_array_query) * (layer->numitems) );
(Line 2052 in v5.0.2)
This is allocated every time the function is called and is never freed.
I put this:
if(layerinfo->items_query) free(layerinfo->items_query); JSK 2008-04-16 try to clean up memory leak in big datasets
one line previous to it to fix it, but looking at the code it may be sufficient to just check if items_query is null and only execute the malloc if items_query is null.
Attachments (1)
Change History (3)
comment:1 by , 15 years ago
by , 15 years ago
Attachment: | maporaclespatial-memleak.patch added |
---|
comment:2 by , 15 years ago
Cc: | added |
---|---|
Milestone: | → 6.0 release |
Resolution: | → fixed |
Status: | new → closed |
Fixed in SVN trunk (6.0) r8715.
Also see #2927