MapServer / MapServer-import

3 stars 2 forks source link

Leaks in maphttp.c #2171

Open tbonfort opened 12 years ago

tbonfort commented 12 years ago

Reporter: dmorissette Date: 2007/07/24 - 19:55 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
tbonfort commented 12 years ago

Author: dmorissette Date: 2007/08/16 - 23:49 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.

Schpidi commented 11 years ago

This is an automated comment

This issue has been closed due to lack of activity. This doesn't mean the issue is invalid, it simply got no attention within the last year. Please reopen if still valid.