diff options
| author | George Schlossnagle <gschlossnagle@php.net> | 2003-02-24 01:29:54 +0000 |
|---|---|---|
| committer | George Schlossnagle <gschlossnagle@php.net> | 2003-02-24 01:29:54 +0000 |
| commit | e7155c5f3ddf5a7efa09f9ad66a6fce1c00820b4 (patch) | |
| tree | 3fbaac399f2f2eb1da0c95904a7262e97f1f61e9 /sapi/apache | |
| parent | fc069fb51b3ca702fcff1aa846c5833af94b2ae7 (diff) | |
| download | php-git-e7155c5f3ddf5a7efa09f9ad66a6fce1c00820b4.tar.gz | |
MFH fix for 19919
Diffstat (limited to 'sapi/apache')
| -rw-r--r-- | sapi/apache/mod_php4.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sapi/apache/mod_php4.c b/sapi/apache/mod_php4.c index b2abb928d8..d5f59b21d2 100644 --- a/sapi/apache/mod_php4.c +++ b/sapi/apache/mod_php4.c @@ -170,6 +170,10 @@ static int sapi_apache_header_handler(sapi_header_struct *sapi_header, sapi_head char *header_name, *header_content, *p; request_rec *r = (request_rec *) SG(server_context); + if(!r) { + efree(sapi_header->header); + return 0; + } header_name = sapi_header->header; header_content = p = strchr(header_name, ':'); @@ -293,11 +297,14 @@ static void php_apache_request_shutdown(void *dummy) TSRMLS_FETCH(); php_output_set_status(0 TSRMLS_CC); - SG(server_context) = NULL; /* The server context (request) is invalid by the time run_cleanups() is called */ if (AP(in_request)) { AP(in_request) = 0; php_request_shutdown(dummy); } + SG(server_context) = NULL; + /* The server context (request) is NOT invalid by the time + * run_cleanups() is called + */ } /* }}} */ |
