From f483a60f3abbd2ec920726ed52779ebd31d928ce Mon Sep 17 00:00:00 2001 From: Andrey Hristov Date: Fri, 12 Jan 2007 20:26:35 +0000 Subject: [PATCH] add a sticky note --- ext/mysqli/mysqli_api.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index b73c4081bc..18afcc5b62 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -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); -- 2.50.1