summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/cpdf/cpdf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/cpdf/cpdf.c b/ext/cpdf/cpdf.c
index 629e20a9e1..17663ca7a2 100644
--- a/ext/cpdf/cpdf.c
+++ b/ext/cpdf/cpdf.c
@@ -428,6 +428,7 @@ PHP_FUNCTION(cpdf_open)
#endif
if (php_check_open_basedir(Z_STRVAL_PP(arg2) TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(Z_STRVAL_PP(arg2), "rb+", CHECKUID_CHECK_MODE_PARAM))) {
+ cpdf_close(cpdf);
RETURN_FALSE;
}