com php-src: fix leak: ext/phar/phar_object.c
| From: | Anatol Belski | Date: | Fri, 02 Sep 2016 18:20:37 +0000 |
| Subject: | com php-src: fix leak: ext/phar/phar_object.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-94263@lists.php.net to get a copy of this message | ||
Commit: 0b5faa446133609ff92a4d3766da97397f61ff34
Author: Anatol Belski <ab@php.net> Fri, 2 Sep 2016 20:20:37 +0200
Parents: 596f488e065800c092a96a061d9732b06999bff3
Branches: PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0b5faa446133609ff92a4d3766da97397f61ff34
Log:
fix leak
Changed paths:
M ext/phar/phar_object.c
Diff:
diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c
index 941cd4c..f3e98a6 100644
--- a/ext/phar/phar_object.c
+++ b/ext/phar/phar_object.c
@@ -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;