From 0868446b3e457e1ce32f63cadff4ef4c8b17344a Mon Sep 17 00:00:00 2001 From: "hf@deer.(none)" <> Date: Fri, 19 Sep 2003 14:17:55 +0500 Subject: SCRUM embedded library missed memory freeing added --- libmysqld/lib_sql.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libmysqld/lib_sql.cc') diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index 24ef3b76c0e..179bbaeec91 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -474,6 +474,16 @@ void *create_embedded_thd(int client_flag, char *db) return thd; } +void free_embedded_thd(MYSQL *mysql) +{ + THD *thd= (THD*)mysql->thd; + if (!thd) + return; + if (thd->data) + free_rows(thd->data); + delete thd; +} + C_MODE_END bool Protocol::send_fields(List *list, uint flag) -- cgit v1.2.1