From: Ilia Alshanetsky Date: Thu, 16 Feb 2006 16:05:02 +0000 (+0000) Subject: MFB51: Fixed bug #36420 (segfault when access result->num_rows after calling X-Git-Tag: RELEASE_1_2~192 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2b24ddb6a3e9dcaf97ddd946c9c2c2fd3208f20a;p=php MFB51: Fixed bug #36420 (segfault when access result->num_rows after calling result->close()) --- 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;