- Fixed many bugs in OCI8. (Tony)
- Fixed crash and leak in mysqli when using 4.1.x client libraries and
connecting to 5.x server. (Andrey)
+- Fixed small leak in mysqli_stmt_fetch() when bound variable was empty
+ string. (Andrey)
- Fixed bug #35760 (sybase_ct doesn't compile on Solaris using old gcc). (Tony)
- Fixed bug #35740 (memory leak when including a directory). (Tony)
- Fixed bug #35730 (ext/mssql + freetds: Use correct character encoding
bind[ofs].buffer = 0;
bind[ofs].is_null = &stmt->result.is_null[ofs];
bind[ofs].buffer_length = 0;
- break;
+ break;
case MYSQL_TYPE_SHORT:
case MYSQL_TYPE_TINY:
if (!ret) {
#endif
for (i = 0; i < stmt->result.var_cnt; i++) {
- if (stmt->result.vars[i]->type == IS_STRING && stmt->result.vars[i]->value.str.len) {
+ /* 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);
}
if (!stmt->result.is_null[i]) {
break;
}
} else {
- stmt->result.vars[i]->type = IS_NULL;
+ ZVAL_NULL(stmt->result.vars[i]);
}
}
} else {