]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fix a storage leak in mod_mime_magic. The strdup() call when processing
authorJeff Trawick <trawick@apache.org>
Tue, 21 Aug 2001 12:46:00 +0000 (12:46 +0000)
committerJeff Trawick <trawick@apache.org>
Tue, 21 Aug 2001 12:46:00 +0000 (12:46 +0000)
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

src/CHANGES
src/modules/standard/mod_mime_magic.c

index bd7adbbd969a696b1f4bc2eadc20b5bfa2631d32..6ca851a1683ccc23f1572e4027e1f8fb14f4b6d3 100644 (file)
@@ -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
index 3f98176ff3579089c4505aa23742a86e10d63df8..e5440f58bc87570fa39576e3bd736c4dbcc18508 100644 (file)
@@ -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 */