]> granicus.if.org Git - php/commitdiff
- Fixed mem leak
authorFelipe Pena <felipe@php.net>
Fri, 25 Sep 2009 01:46:58 +0000 (01:46 +0000)
committerFelipe Pena <felipe@php.net>
Fri, 25 Sep 2009 01:46:58 +0000 (01:46 +0000)
ext/standard/file.c

index 90a0b2c8e42a5d226688874e7ac2d6c96e28e9ea..fb3c71f6ca6f0413eae3918ef0cc6295216cdaf1 100644 (file)
@@ -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;
 }
 /* }}} */