]> granicus.if.org Git - php/commitdiff
fix leak
authorAnatol Belski <ab@php.net>
Fri, 2 Sep 2016 18:20:37 +0000 (20:20 +0200)
committerAnatol Belski <ab@php.net>
Fri, 2 Sep 2016 18:20:37 +0000 (20:20 +0200)
ext/phar/phar_object.c

index 941cd4cebd17d671e783516645bdcdb2e783c942..f3e98a6d96f3ed3a101a20837f0b4b4366c2af4d 100644 (file)
@@ -665,6 +665,7 @@ PHP_METHOD(Phar, webPhar)
                        if (free_pathinfo) {
                                efree(path_info);
                        }
+                       efree(pt);
 
                        return;
                }
@@ -682,6 +683,7 @@ PHP_METHOD(Phar, webPhar)
                        if (free_pathinfo) {
                                efree(path_info);
                        }
+                       efree(pt);
 
                        return;
                }
@@ -691,6 +693,7 @@ PHP_METHOD(Phar, webPhar)
                                efree(path_info);
                        }
                        zend_throw_exception_ex(phar_ce_PharException, 0, "phar error: rewrite callback must return a string or false");
+                       efree(pt);
                        return;
                }
 
@@ -707,6 +710,7 @@ PHP_METHOD(Phar, webPhar)
                                if (free_pathinfo) {
                                        efree(path_info);
                                }
+                               efree(pt);
 
                                zend_bailout();
                                return;
@@ -714,6 +718,7 @@ PHP_METHOD(Phar, webPhar)
                                if (free_pathinfo) {
                                        efree(path_info);
                                }
+                               efree(pt);
 
                                zend_throw_exception_ex(phar_ce_PharException, 0, "phar error: rewrite callback must return a string or false");
                                return;