From: Dmitry Stogov Date: Mon, 19 May 2014 12:19:01 +0000 (+0400) Subject: Fixed incorrect efree() X-Git-Tag: POST_PHPNG_MERGE~320 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=78e4f03c22de421832b5e20520543660f716f3af;p=php Fixed incorrect efree() --- diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index f723197527..e8f9c4c481 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -712,15 +712,8 @@ PHP_METHOD(Phar, webPhar) switch (Z_TYPE(retval)) { case IS_STRING: efree(entry); - - if (fci.retval != &retval) { - entry = estrndup(Z_STRVAL_P(fci.retval), Z_STRLEN_P(fci.retval)); - entry_len = Z_STRLEN_P(fci.retval); - } else { - entry = Z_STRVAL(retval); - entry_len = Z_STRLEN(retval); - } - + entry = estrndup(Z_STRVAL_P(fci.retval), Z_STRLEN_P(fci.retval)); + entry_len = Z_STRLEN_P(fci.retval); break; case IS_TRUE: case IS_FALSE: