felipe                                   Fri, 25 Sep 2009 01:46:58 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=288705

Log:
- Fixed mem leak

Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/standard/file.c
    U   php/php-src/trunk/ext/standard/file.c

Modified: php/php-src/branches/PHP_5_3/ext/standard/file.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/file.c    2009-09-25 01:45:26 UTC 
(rev 288704)
+++ php/php-src/branches/PHP_5_3/ext/standard/file.c    2009-09-25 01:46:58 UTC 
(rev 288705)
@@ -854,13 +854,14 @@
        if (p_len > 64) {
                p[63] = '\0';
        }
+
+       RETVAL_FALSE;

        if ((fd = php_open_temporary_fd(dir, p, &opened_path TSRMLS_CC)) >= 0) {
                close(fd);
                RETVAL_STRING(opened_path, 0);
        }
        efree(p);
-       RETURN_FALSE;
 }
 /* }}} */


Modified: php/php-src/trunk/ext/standard/file.c
===================================================================
--- php/php-src/trunk/ext/standard/file.c       2009-09-25 01:45:26 UTC (rev 
288704)
+++ php/php-src/trunk/ext/standard/file.c       2009-09-25 01:46:58 UTC (rev 
288705)
@@ -964,6 +964,8 @@
        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 @@
                efree(opened_path);
        }
        efree(p);
-       RETURN_FALSE;
 }
 /* }}} */


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to