From: Ilia Alshanetsky Date: Thu, 19 Feb 2004 02:20:14 +0000 (+0000) Subject: MFH: Fixed possible resource/memory leak. X-Git-Tag: php-4.3.5RC4~84 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=221d4b346b0cda4918671b265a0f096b5dd9c508;p=php MFH: Fixed possible resource/memory leak. --- diff --git a/ext/cpdf/cpdf.c b/ext/cpdf/cpdf.c index 9f2134cb3b..8328c71839 100644 --- a/ext/cpdf/cpdf.c +++ b/ext/cpdf/cpdf.c @@ -476,6 +476,7 @@ PHP_FUNCTION(cpdf_open) php_error(E_WARNING, "%s(): Writing to stdout as described in the ClibPDF manual is not possible if php is used as an Apache module. Write to a memory stream and use cpdf_output_buffer() instead.", get_active_function_name(TSRMLS_C)); #endif if (php_check_open_basedir(Z_STRVAL_P(arg2) TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(Z_STRVAL_P(arg2), "rb+", CHECKUID_CHECK_MODE_PARAM))) { + cpdf_close(cpdf); RETURN_FALSE; }