Opened 17 years ago
Last modified 15 years ago
#2171 new defect
Leaks in maphttp.c
Reported by: | dmorissette | Owned by: | dmorissette |
---|---|---|---|
Priority: | normal | Milestone: | 6.0 release |
Component: | WMS Client | Version: | 5.0 |
Severity: | normal | Keywords: | |
Cc: |
Description
msHTTPExecuteRequests() is leaking some curl data structures in error situations: https://trac.osgeo.org/mapserver/browser/trunk/mapserver/maphttp.c?rev=6384
(12:41:43) Nowak: danmo: line 285, multi_handle not killed (12:42:08) Nowak: and easy handles not removed ;) (12:42:37) Nowak: same at line 323 (12:43:05) Nowak: 376 (12:50:19) Nowak: output file is not closed, in all the above
Change History (3)
comment:1 by , 17 years ago
Milestone: | 5.0 release → 5.2 release |
---|
comment:2 by , 16 years ago
Milestone: | 5.2 release → 5.4 release |
---|
comment:3 by , 15 years ago
Milestone: | 5.4 release → 6.0 release |
---|
Note:
See TracTickets
for help on using tickets.
The probability of those leaks happening is fairly low so I'll push that to 5.2.
Two of the return paths in that loop (lines 285 and 323) could be considered assertions, they'll happen only if things are going real bad in which case a leak will be a minor problem. The third return path in the loop (line 376) would happen only if the output file cannot be opened... this is more likely to happen but still wouldn't happen on a server in normal working conditions.
I think the best fix will be to 'continue' the loop in those three cases (instead of returning) and to set things up so that the cleanup loop at the end of msHTTPExecuteRequests() still works reliably even if some members are not set due to the errors in the init loop.