com php-src: Temporary fix memory leaks: ext/date/php_date. c

From: Date: Fri, 07 Mar 2014 13:09:45 +0000
Subject: com php-src: Temporary fix memory leaks: ext/date/php_date. c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-77684@lists.php.net to get a copy of this message
Commit: ab3d1e0d03da10d6ca7fc43e1ebd6b04151213f8 Author: Dmitry Stogov <dmitry@zend.com> Fri, 7 Mar 2014 17:09:45 +0400 Parents: 97156bc141fe1cd87d4b19ef71f26fc7cb3d7f90 Branches: phpng Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ab3d1e0d03da10d6ca7fc43e1ebd6b04151213f8 Log: Temporary fix memory leaks Changed paths: M ext/date/php_date.c Diff: diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 3c582b2..6fc4284 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -2220,6 +2220,7 @@ static HashTable *date_object_get_properties(zval *object TSRMLS_DC) //??? ZVAL_STRING(zv, tmpstr, 0); ZVAL_STRING(&zv, tmpstr); + efree(tmpstr); } break; case TIMELIB_ZONETYPE_ABBR: @@ -2312,6 +2313,7 @@ static HashTable *date_object_get_properties_timezone(zval *object TSRMLS_DC) //??? ZVAL_STRING(zv, tmpstr, 0); ZVAL_STRING(&zv, tmpstr); + efree(tmpstr); } break; case TIMELIB_ZONETYPE_ABBR: @@ -3747,7 +3749,9 @@ PHP_FUNCTION(timezone_name_get) abs((utc_offset % 60))); //??? RETURN_STRING(tmpstr, 0); - RETURN_STRING(tmpstr); + RETVAL_STRING(tmpstr); + efree(tmpstr); + return; } break; case TIMELIB_ZONETYPE_ABBR: @@ -4622,7 +4626,9 @@ static void php_do_date_sunrise_sunset(INTERNAL_FUNCTION_PARAMETERS, int calc_su case SUNFUNCS_RET_STRING: spprintf(&retstr, 0, "%02d:%02d", (int) N, (int) (60 * (N - (int) N))); //??? RETURN_STRINGL(retstr, 5, 0); - RETURN_STRINGL(retstr, 5); + RETVAL_STRINGL(retstr, 5); + efree(retstr); + return; break; case SUNFUNCS_RET_DOUBLE: RETURN_DOUBLE(N);

« previous php.cvs (#77684) next »