From 25704f07536f80ba8c721efe6ef895777bb4724e Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Fri, 30 May 2003 12:28:48 +0000 Subject: [PATCH] Fix memleaks (detected by rrichards@php.net) --- ext/standard/info.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ext/standard/info.c b/ext/standard/info.c index ca14bb7e7d..fe0709da69 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -395,6 +395,7 @@ PHPAPI void php_print_info(int flag TSRMLS_DC) if (flag & PHP_INFO_GENERAL) { char *zend_version = get_zend_version(); char temp_api[9]; + char *logo_guid; php_uname = php_get_uname('a'); @@ -408,7 +409,9 @@ PHPAPI void php_print_info(int flag TSRMLS_DC) PUTS(SG(request_info).request_uri); } PUTS("?="); - PUTS(php_logo_guid()); + logo_guid = php_logo_guid(); + PUTS(logo_guid); + efree(logo_guid); PUTS("\" alt=\"PHP Logo\" />"); } @@ -954,7 +957,7 @@ PHP_FUNCTION(php_logo_guid) WRONG_PARAM_COUNT; } - RETURN_STRING(php_logo_guid(), 1); + RETURN_STRING(php_logo_guid(), 0); } /* }}} */ -- 2.50.1