From 2b24ddb6a3e9dcaf97ddd946c9c2c2fd3208f20a Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Thu, 16 Feb 2006 16:05:02 +0000 Subject: [PATCH] MFB51: Fixed bug #36420 (segfault when access result->num_rows after calling result->close()) --- ext/mysqli/mysqli.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c index 05b52f3758..2ba9c8ebfd 100644 --- a/ext/mysqli/mysqli.c +++ b/ext/mysqli/mysqli.c @@ -200,6 +200,11 @@ zval *mysqli_read_property(zval *object, zval *member, int type TSRMLS_DC) ret = FAILURE; obj = (mysqli_object *)zend_objects_get_address(object TSRMLS_CC); + /* object was already destroyed */ + if (!obj->ptr) { + retval = EG(uninitialized_zval_ptr); + return(retval); + } if (member->type != IS_STRING) { tmp_member = *member; -- 2.50.1