summaryrefslogtreecommitdiff
path: root/archivers/php53-phar/files/patch-CVE-2015-2301
blob: 896408a16ffccaab8af9f442fc5eafd3a9b703c9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
--- phar_object.c	2015-03-16 13:56:47.878348393 -0400
+++ phar_object.c	2015-03-16 13:56:47.826347993 -0400
@@ -2320,8 +2320,8 @@
 	}
 its_ok:
 	if (SUCCESS == php_stream_stat_path(newpath, &ssb)) {
-		efree(oldpath);
 		zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "phar \"%s\" exists and must be unlinked prior to conversion", newpath);
+		efree(oldpath);
 		return NULL;
 	}
 	if (!phar->is_data) {