summaryrefslogtreecommitdiff
path: root/ext/mysqli/mysqli.c
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2005-09-13 09:20:18 +0000
committerAntony Dovgal <tony2001@php.net>2005-09-13 09:20:18 +0000
commitbd7a277d48fe358f44c569df5f4709f2a8318e4e (patch)
treec6b51356567590c7873d23f83f52792451bbf3c1 /ext/mysqli/mysqli.c
parent196e54fc43ddba3a8ff0731fd0f5d1d5265cd507 (diff)
downloadphp-git-bd7a277d48fe358f44c569df5f4709f2a8318e4e.tar.gz
fix #34450 (Segfault when calling mysqli_close() in destructor)
Diffstat (limited to 'ext/mysqli/mysqli.c')
-rw-r--r--ext/mysqli/mysqli.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c
index 5307f45ed0..ce7b12dcd5 100644
--- a/ext/mysqli/mysqli.c
+++ b/ext/mysqli/mysqli.c
@@ -133,9 +133,11 @@ static void mysqli_objects_free_storage(zend_object *object TSRMLS_DC)
static void mysqli_objects_destroy_object(void *object, zend_object_handle handle TSRMLS_DC)
{
mysqli_object *intern = (mysqli_object *)object;
- MYSQLI_RESOURCE *my_res = (MYSQLI_RESOURCE *)intern->ptr;
+ MYSQLI_RESOURCE *my_res;
zend_objects_destroy_object(object, handle TSRMLS_CC);
+
+ my_res = (MYSQLI_RESOURCE *)intern->ptr;
/* link object */
if (instanceof_function(intern->zo.ce, mysqli_link_class_entry TSRMLS_CC)) {