From 221d4b346b0cda4918671b265a0f096b5dd9c508 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Thu, 19 Feb 2004 02:20:14 +0000 Subject: [PATCH] MFH: Fixed possible resource/memory leak. --- ext/cpdf/cpdf.c | 1 + 1 file changed, 1 insertion(+) 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; } -- 2.50.1