scottmac Mon Jan 28 16:12:55 2008 UTC
Modified files: (Branch: PHP_5_2)
/php-src NEWS
/php-src/main SAPI.c
Log:
MFH: Fixed bug #43954 (Memory leak when sending the same HTTP status code
more than once.)
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1060&r2=1.2027.2.547.2.1061&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1060 php-src/NEWS:1.2027.2.547.2.1061
--- php-src/NEWS:1.2027.2.547.2.1060 Sat Jan 26 16:26:33 2008
+++ php-src/NEWS Mon Jan 28 16:12:54 2008
@@ -8,6 +8,8 @@
which to group by data is specified. (Ilia)
- Upgraded PCRE to version 7.5 (Nuno)
+- Fixed bug #43954 (Memory leak when sending the same HTTP status code
+ multiple times). (Scott)
- Fixed faulty fix for bug #40189 (endless loop in zlib.inflate stream
filter).
(Greg)
- Fixed bug #43912 (Interbase column names are truncated to 31 characters).
http://cvs.php.net/viewvc.cgi/php-src/main/SAPI.c?r1=1.202.2.7.2.17&r2=1.202.2.7.2.18&diff_format=u
Index: php-src/main/SAPI.c
diff -u php-src/main/SAPI.c:1.202.2.7.2.17 php-src/main/SAPI.c:1.202.2.7.2.18
--- php-src/main/SAPI.c:1.202.2.7.2.17 Mon Dec 31 07:20:14 2007
+++ php-src/main/SAPI.c Mon Jan 28 16:12:55 2008
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: SAPI.c,v 1.202.2.7.2.17 2007/12/31 07:20:14 sebastian Exp $ */
+/* $Id: SAPI.c,v 1.202.2.7.2.18 2008/01/28 16:12:55 scottmac Exp $ */
#include <ctype.h>
#include <sys/stat.h>
@@ -593,6 +593,10 @@
&& !strncasecmp(header_line, "HTTP/", 5)) {
/* filter out the response code */
sapi_update_response_code(sapi_extract_response_code(header_line) TSRMLS_CC);
+ /* sapi_update_response_code doesn't free the status line if
the code didn't change */
+ if (SG(sapi_headers).http_status_line) {
+ efree(SG(sapi_headers).http_status_line);
+ }
SG(sapi_headers).http_status_line = header_line;
return SUCCESS;
} else {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php