From e0fb69cfc4e4556aa5e735b0e0057d06620a46aa Mon Sep 17 00:00:00 2001 From: Aaron Bannert Date: Fri, 12 Apr 2002 22:26:28 +0000 Subject: [PATCH] Fix a typo and a build error detected by the lovely HPUX11 ANSI C compiler. --- sapi/apache2filter/sapi_apache2.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sapi/apache2filter/sapi_apache2.c b/sapi/apache2filter/sapi_apache2.c index 986de019f2..24724bb9b7 100644 --- a/sapi/apache2filter/sapi_apache2.c +++ b/sapi/apache2filter/sapi_apache2.c @@ -257,7 +257,7 @@ static int php_input_filter(ap_filter_t *f, apr_bucket_brigade *bb, long old_index; apr_bucket *b; const char *str; - apr_ssize_t n; + apr_size_t n; apr_status_t rv; TSRMLS_FETCH(); @@ -322,10 +322,12 @@ static void php_apache_request_dtor(ap_filter_t *f TSRMLS_DC) { php_request_shutdown(NULL); -#undef safe_free -#define safe_free(x) ((x)?free((x)):0) - safe_free(SG(request_info).query_string); - safe_free(SG(request_info).request_uri); + if (SG(request_info).query_string) { + free(SG(request_info).query_string); + } + if (SG(request_info).query_string) { + free(SG(request_info).request_uri); + } } static int php_output_filter(ap_filter_t *f, apr_bucket_brigade *bb) -- 2.50.1