]> granicus.if.org Git - php/commitdiff
don't free function name before calling the function
authorAntony Dovgal <tony2001@php.net>
Tue, 29 Jul 2008 11:09:00 +0000 (11:09 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 29 Jul 2008 11:09:00 +0000 (11:09 +0000)
ext/phar/util.c

index d7067e2e8cfc3e2471c016279250edff93277279..add7ce8d160741a2a49f2a5ff0d2ef566e7a93dc 100644 (file)
@@ -1510,10 +1510,9 @@ static int phar_call_openssl_signverify(int is_sign, php_stream *fp, off_t end,
                zval_dtor(zsig);
                zval_dtor(zkey);
                zval_dtor(openssl);
+               efree(openssl);
                return FAILURE;
        }
-       zval_dtor(openssl);
-       efree(openssl);
 
        fci.param_count = 3;
        fci.params = zp;
@@ -1536,11 +1535,16 @@ static int phar_call_openssl_signverify(int is_sign, php_stream *fp, off_t end,
                zval_dtor(zdata);
                zval_dtor(zsig);
                zval_dtor(zkey);
+               zval_dtor(openssl);
+               efree(openssl);
                efree(zdata);
                efree(zkey);
                efree(zsig);
                return FAILURE;
        }
+       zval_dtor(openssl);
+       efree(openssl);
+
 #if PHP_VERSION_ID < 50300
        --(zdata->refcount);
        --(zsig->refcount);