From: Greg Beaver Date: Sat, 27 Jan 2007 18:03:40 +0000 (+0000) Subject: fix incorrect refcount increment on unlink() X-Git-Tag: RELEASE_1_0_0RC1~121 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=74d7701b2bd481760d20c0f3ec7083b443591b3a;p=php fix incorrect refcount increment on unlink() --- diff --git a/ext/phar/phar.c b/ext/phar/phar.c index 7bf7145717..eafe3d150e 100644 --- a/ext/phar/phar.c +++ b/ext/phar/phar.c @@ -2457,6 +2457,8 @@ static int phar_wrapper_unlink(php_stream_wrapper *wrapper, char *url, int optio php_url_free(resource); return FAILURE; } + /* faulty increment of phar refcount - nothing persists beyond this function */ + idata->phar->refcount--; if (idata->internal_file->fp_refcount > 1) { /* more than just our fp resource is open for this file */ php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "phar error: \"%s\" in phar \"%s\", has open file pointers, cannot unlink", internal_file, resource->host);