Browse Source

Fixed bug #43954 (Memory leak when sending the same HTTP status code more than once.)

experimental/first_unicode_implementation
Scott MacVicar 19 years ago
parent
commit
352c3a7f1b
  1. 4
      main/SAPI.c

4
main/SAPI.c

@ -616,6 +616,10 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg TSRMLS_DC)
&& !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 {

Loading…
Cancel
Save