From: Felipe Pena Date: Fri, 25 Sep 2009 01:46:58 +0000 (+0000) Subject: - Fixed mem leak X-Git-Tag: php-5.4.0alpha1~191^2~2587 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=275cd0d7d99bfb941bc4cae0f501dc3d6dcdcc97;p=php - Fixed mem leak --- diff --git a/ext/standard/file.c b/ext/standard/file.c index 90a0b2c8e4..fb3c71f6ca 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -964,6 +964,8 @@ PHP_FUNCTION(tempnam) if (p_len > 64) { p[63] = '\0'; } + + RETVAL_FALSE; if ((fd = php_open_temporary_fd(dir, p, &opened_path TSRMLS_CC)) >= 0) { UChar *utmpnam; @@ -977,7 +979,6 @@ PHP_FUNCTION(tempnam) efree(opened_path); } efree(p); - RETURN_FALSE; } /* }}} */