From: Jeff Trawick Date: Tue, 21 Aug 2001 12:46:00 +0000 (+0000) Subject: Fix a storage leak in mod_mime_magic. The strdup() call when processing X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c392333a296877c29b6ff89245b93f57d63f37ed;p=thirdparty%2Fapache%2Fhttpd.git Fix a storage leak in mod_mime_magic. The strdup() call when processing a request should have been an ap_pstrdup() call. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@90467 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/CHANGES b/src/CHANGES index bd7adbbd969..6ca851a1683 100644 --- a/src/CHANGES +++ b/src/CHANGES @@ -1,5 +1,8 @@ Changes with Apache 1.3.21 + *) Fix a storage leak (a strdup() call) in mod_mime_magic. + [Jeff Trawick] + *) We have always used the obsolete/deprecated Netscape syntax for our tracking cookies; now the CookieStyle directive allows the Webmaster to choose the Netscape, RFC2109, or diff --git a/src/modules/standard/mod_mime_magic.c b/src/modules/standard/mod_mime_magic.c index 3f98176ff35..e5440f58bc8 100644 --- a/src/modules/standard/mod_mime_magic.c +++ b/src/modules/standard/mod_mime_magic.c @@ -623,7 +623,7 @@ static int magic_rsl_printf(request_rec *r, char *str,...) va_end(ap); /* add the buffer to the list */ - return magic_rsl_add(r, strdup(buf)); + return magic_rsl_add(r, ap_pstrdup(r->pool, buf)); } /* RSL hook for putchar-type functions */