From 7c710a9f9bb65f90d35bdb88d2bc70df1f03b81c Mon Sep 17 00:00:00 2001 From: Zeev Suraski Date: Sun, 15 Feb 2004 12:58:19 +0000 Subject: Use zval_ptr_dtor() to free variables as soon as they hit refcount of 0. Note: You should not be using ZVAL_DELREF() in day to day usage. Instead, you should use zval_ptr_dtor(). Use ZVAL_DELREF() only if you're messing with the refcount directly and know what you're doing. Note #2: For clarity, if you want to initialize a new zval with a refcount of 0, it's best to do that directly, instead of using ZVAL_DELREF after allocating the zval... --- ext/mysqli/mysqli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/mysqli/mysqli.c') diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c index 9bf75d9bbb..4befc71e64 100644 --- a/ext/mysqli/mysqli.c +++ b/ext/mysqli/mysqli.c @@ -70,7 +70,7 @@ void php_free_stmt_bind_buffer(BIND_BUFFER bbuf, int type) } } if (bbuf.vars[i]) { - ZVAL_DELREF(bbuf.vars[i]); + zval_ptr_dtor(&bbuf.vars[i]); } } -- cgit v1.2.1