]> granicus.if.org Git - php/commitdiff
MFH: Fixed possible resource/memory leak.
authorIlia Alshanetsky <iliaa@php.net>
Thu, 19 Feb 2004 02:20:14 +0000 (02:20 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 19 Feb 2004 02:20:14 +0000 (02:20 +0000)
ext/cpdf/cpdf.c

index 9f2134cb3b29f31052ad62e18de1b0cad5db2cf2..8328c718394c4d1ea27eb7ee461ea06bef30ba03 100644 (file)
@@ -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;
                }