diff options
author | unknown <holyfoot/hf@mysql.com/hfmain.(none)> | 2007-01-29 11:48:31 +0400 |
---|---|---|
committer | unknown <holyfoot/hf@mysql.com/hfmain.(none)> | 2007-01-29 11:48:31 +0400 |
commit | 925d4fb92107c0794060bd8856958c4d13d83e4f (patch) | |
tree | fb68806a20978516dea402bf9bf65de8af0a6156 /libmysqld | |
parent | 6d04643ab3b8ed31a693ac1df6dadc7da42c53b8 (diff) | |
download | mariadb-git-925d4fb92107c0794060bd8856958c4d13d83e4f.tar.gz |
bug #25492 (Invalid deallocation in mysql_stmt_fetch)
Operating with the prepared statements we don't alloc MYSQL_DATA structure,
but use MYSQL_STMT's field instead (to increase performance by reducing
malloc calls).
So we shouldn't free this structure as we did before.
libmysqld/lib_sql.cc:
we only should free data->alloc here, as the 'data' is a member
of STMT structure
Diffstat (limited to 'libmysqld')
-rw-r--r-- | libmysqld/lib_sql.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index fe4ac5ba676..3a8bc189e7f 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -269,7 +269,7 @@ int emb_unbuffered_fetch(MYSQL *mysql, char **row) *row= NULL; if (data) { - free_rows(data); + free_root(&data->alloc,MYF(0)); ((THD*)mysql->thd)->data= NULL; } } |