Opened 12 years ago
#4263 new defect
file descriptor and memory leak
Reported by: | nbrachet | Owned by: | sdlime |
---|---|---|---|
Priority: | normal | Milestone: | 6.0.2 release |
Component: | MapServer C Library | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
I'm not quite sure how it happens but I believe when a layer has a TILEINDEX file msTiledSHPOpenFile() is called twice, once from the msQuery*() call, then again from the msLayerOpen() call.
Our exact sequence (from Java) is:
int rc = layer.queryByPoint(map, point, mode, buffer); if (rc != MS_SUCCESS) return rc; rc = layer.open(); if (rc != MS_SUCCESS) return rc; return MS_SUCCESS;
msTiledSHPOpenFile() blindly overwrites layer->layerinfo. Obviously when layer->layerinfo already points to a msTiledSHPLayerInfo and its opened file descriptors are leaked.
The attached patch is merely plugging the hole. The actual fix might be more complicated.
Attachments (1)
Note:
See TracTickets
for help on using tickets.