diff options
author | unknown <holyfoot/hf@mysql.com/hfmain.(none)> | 2007-07-16 19:08:07 +0500 |
---|---|---|
committer | unknown <holyfoot/hf@mysql.com/hfmain.(none)> | 2007-07-16 19:08:07 +0500 |
commit | 9917ce268d41942e977e0cfe0f093c20bb4018a2 (patch) | |
tree | 7ac0f6e9c804c4169925c0df23ce58f4f9c8c3d3 /libmysql | |
parent | 85603b2e0b6b51c57de7019f451461e676c458de (diff) | |
download | mariadb-git-9917ce268d41942e977e0cfe0f093c20bb4018a2.tar.gz |
Bug #29687 mysql_stmt_store_result memory leak in libmysqld
In embedded server we use result->alloc to store field data for the
result, but we didn't clean the result->alloc if the query returned
an empty recordset. Cleaning for the empty recordset enabled
libmysql/libmysql.c:
Bug #29687 mysql_stmt_store_result memory leak in libmysqld
we should clean result->alloc even if we have nothin in 'data' field
Diffstat (limited to 'libmysql')
-rw-r--r-- | libmysql/libmysql.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 72bc4445d83..1a0aae414ed 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -4945,7 +4945,7 @@ static my_bool reset_stmt_handle(MYSQL_STMT *stmt, uint flags) Reset stored result set if so was requested or it's a part of cursor fetch. */ - if (result->data && (flags & RESET_STORE_RESULT)) + if (flags & RESET_STORE_RESULT) { /* Result buffered */ free_root(&result->alloc, MYF(MY_KEEP_PREALLOC)); |