summaryrefslogtreecommitdiff
path: root/ext/sqlite/sqlite.c
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2003-08-28 23:36:46 +0000
committerMarcus Boerger <helly@php.net>2003-08-28 23:36:46 +0000
commitb75133c0c62c7574bc7d944aa18bf385e426d18e (patch)
tree0c7f00081d32c1a75363b4b8c3bc55f6968b46d2 /ext/sqlite/sqlite.c
parent257223bdcc3bca7c1178b9b3889dedee4b9f1625 (diff)
downloadphp-git-b75133c0c62c7574bc7d944aa18bf385e426d18e.tar.gz
Need to check if we got any value before destroying it
Diffstat (limited to 'ext/sqlite/sqlite.c')
-rw-r--r--ext/sqlite/sqlite.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/sqlite/sqlite.c b/ext/sqlite/sqlite.c
index 2b0deacb8b..379138d8f5 100644
--- a/ext/sqlite/sqlite.c
+++ b/ext/sqlite/sqlite.c
@@ -1735,7 +1735,9 @@ PHP_FUNCTION(sqlite_fetch_object)
if (zend_call_function(&fci, &fcc TSRMLS_CC) == FAILURE) {
zend_throw_exception_ex(sqlite_ce_exception, 0 TSRMLS_CC, "Could not execute %s::%s()", class_name, ce->constructor->common.function_name);
} else {
- zval_ptr_dtor(&retval_ptr);
+ if (retval_ptr) {
+ zval_ptr_dtor(&retval_ptr);
+ }
}
}
}