]> granicus.if.org Git - php/commitdiff
Fixed incorrect efree()
authorDmitry Stogov <dmitry@zend.com>
Mon, 19 May 2014 12:19:01 +0000 (16:19 +0400)
committerDmitry Stogov <dmitry@zend.com>
Mon, 19 May 2014 12:19:01 +0000 (16:19 +0400)
ext/phar/phar_object.c

index f72319752700998a1f94a1d752af5c4d2116288e..e8f9c4c481cb54ed72dcd351088e59df6a20e25d 100644 (file)
@@ -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: