]> granicus.if.org Git - php/commitdiff
Fixed Bug #55653(PS crash with libmysql when binding same variable as param and out)
authorXinchen Hui <laruence@php.net>
Sat, 10 Sep 2011 03:51:16 +0000 (03:51 +0000)
committerXinchen Hui <laruence@php.net>
Sat, 10 Sep 2011 03:51:16 +0000 (03:51 +0000)
Actually this caused by attempt to efree a INTERNED string

ext/mysqli/mysqli_api.c

index e20d963fbb4966e94a9e69da66160f279f308ab7..1649597c97c5a171f5c91869dd819c32c8fe9c04 100644 (file)
@@ -887,7 +887,7 @@ void mysqli_stmt_fetch_libmysql(INTERNAL_FUNCTION_PARAMETERS)
                        */
                        /* 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);
+                               STR_FREE(stmt->result.vars[i]->value.str.val);
                        }
                        if (!stmt->result.is_null[i]) {
                                switch (stmt->result.buf[i].type) {