Make sure all filehandles are closed at the end of a trasaction. See #464 and #465.

Fixes a few typos in some error messages when we are over the limits.
This commit is contained in:
brectanus
2008-03-28 20:00:37 +00:00
parent b7e59e5e4d
commit ecddb188f3
6 changed files with 33 additions and 3 deletions

View File

@@ -607,6 +607,12 @@ apr_status_t modsecurity_request_body_clear(modsec_rec *msr) {
log_escape(msr->msc_reqbody_mp, put_filename));
}
} else {
/* make sure it is closed first */
if (msr->msc_reqbody_fd > 0) {
close(msr->msc_reqbody_fd);
msr->msc_reqbody_fd = -1;
}
/* We do not want to keep the request body. */
if (apr_file_remove(msr->msc_reqbody_filename,
msr->msc_reqbody_mp) != APR_SUCCESS)