Changes with Apache 2.3.0
[ When backported to 2.2.x, remove entry from this file ]
+ *) rotatelogs: Don't leak memory when reopening the logfile.
+ PR 40183 [Ruediger Pluem, Takashi Sato <serai lans-tv.com>]
+
*) mod_ldap: Add support (taking advantage of the new APR capability)
for ldap rebind callback while chasing referrals. This allows direct
searches on LDAP servers (in particular MS Active Directory 2003+)
const char *szLogRoot;
apr_file_t *f_stdin, *nLogFD = NULL, *nLogFDprev = NULL;
apr_pool_t *pool;
+ apr_pool_t *pfile = NULL;
+ apr_pool_t *pfile_prev = NULL;
apr_getopt_t *opt;
apr_status_t rv;
char c;
sprintf(buf2, "%s.%010d", szLogRoot, tLogStart);
}
tLogEnd = tLogStart + tRotation;
+ pfile_prev = pfile;
+ apr_pool_create(&pfile, pool);
rv = apr_file_open(&nLogFD, buf2, APR_WRITE | APR_CREATE | APR_APPEND,
- APR_OS_DEFAULT, pool);
+ APR_OS_DEFAULT, pfile);
if (rv != APR_SUCCESS) {
char error[120];
}
else {
nLogFD = nLogFDprev;
+ apr_pool_destroy(pfile);
+ pfile = pfile_prev;
/* Try to keep this error message constant length
* in case it occurs several times. */
apr_snprintf(errbuf, sizeof errbuf,
}
else if (nLogFDprev) {
apr_file_close(nLogFDprev);
+ if (pfile_prev) {
+ apr_pool_destroy(pfile_prev);
+ }
}
nMessCount = 0;
}