com php-src: Fixed memory leak: ext/standard/var_unserializer .c ext/standard/var_unserializer.re

From: Date: Fri, 23 Jan 2015 18:47:26 +0000
Subject: com php-src: Fixed memory leak: ext/standard/var_unserializer .c ext/standard/var_unserializer.re
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-84350@lists.php.net to get a copy of this message
Commit: e4271887559cc2a2c8a95825a23fe33859cef41b Author: Dmitry Stogov <dmitry@zend.com> Fri, 23 Jan 2015 21:47:26 +0300 Parents: be31acc9278bd748689f3eb547bef175b7239626 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e4271887559cc2a2c8a95825a23fe33859cef41b Log: Fixed memory leak Changed paths: M ext/standard/var_unserializer.c M ext/standard/var_unserializer.re Diff: diff --git a/ext/standard/var_unserializer.c b/ext/standard/var_unserializer.c index fcad792..053a680 100644 --- a/ext/standard/var_unserializer.c +++ b/ext/standard/var_unserializer.c @@ -85,7 +85,7 @@ PHPAPI void var_push_dtor(php_unserialize_data_t *var_hashx, zval *rval) if (!(*var_hashx)->first_dtor) { (*var_hashx)->first_dtor = var_hash; } else { - ((var_entries *) (*var_hashx)->last_dtor)->next = var_hash; + ((var_dtor_entries *) (*var_hashx)->last_dtor)->next = var_hash; } (*var_hashx)->last_dtor = var_hash; @@ -526,38 +526,38 @@ PHPAPI int php_var_unserialize_ex(UNSERIALIZE_PARAMETER) { YYCTYPE yych; static const unsigned char yybm[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0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0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, }; if ((YYLIMIT - YYCURSOR) < 7) YYFILL(7); diff --git a/ext/standard/var_unserializer.re b/ext/standard/var_unserializer.re index 1007d49..0b8a8cc 100644 --- a/ext/standard/var_unserializer.re +++ b/ext/standard/var_unserializer.re @@ -83,7 +83,7 @@ PHPAPI void var_push_dtor(php_unserialize_data_t *var_hashx, zval *rval) if (!(*var_hashx)->first_dtor) { (*var_hashx)->first_dtor = var_hash; } else { - ((var_entries *) (*var_hashx)->last_dtor)->next = var_hash; + ((var_dtor_entries *) (*var_hashx)->last_dtor)->next = var_hash; } (*var_hashx)->last_dtor = var_hash;

« previous php.cvs (#84350) next »