]> granicus.if.org Git - php/commitdiff
add a sticky note
authorAndrey Hristov <andrey@php.net>
Fri, 12 Jan 2007 20:26:35 +0000 (20:26 +0000)
committerAndrey Hristov <andrey@php.net>
Fri, 12 Jan 2007 20:26:35 +0000 (20:26 +0000)
ext/mysqli/mysqli_api.c

index b73c4081bcdb0b57ab72f11a2b9ce42cf47c984b..18afcc5b62c2a3ec07ea29c23d7cff430f580e1f 100644 (file)
@@ -686,6 +686,11 @@ PHP_FUNCTION(mysqli_stmt_fetch)
        if (!ret) {
 #endif
                for (i = 0; i < stmt->result.var_cnt; i++) {
+                       /*
+                         QQ: Isn't it quite better to call zval_dtor(). What if the user has
+                         assigned a resource, or an array to the bound variable? We are going
+                         to leak probably. zval_dtor() will handle also Unicode/Non-unicode mode.
+                       */
                        /* Even if the string is of length zero there is one byte alloced so efree() in all cases */
                        if (Z_TYPE_P(stmt->result.vars[i]) == IS_STRING) {
                                efree(stmt->result.vars[i]->value.str.val);