summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 60220ffc889..89b812eb205 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -323,12 +323,14 @@ THD::~THD()
#endif
DBUG_PRINT("info", ("freeing host"));
+#ifndef EMBEDDED_LIBRARY
if (host != my_localhost) // If not pointer to constant
safeFree(host);
if (user != delayed_user)
safeFree(user);
- safeFree(db);
safeFree(ip);
+#endif
+ safeFree(db);
free_root(&warn_root,MYF(0));
free_root(&transaction.mem_root,MYF(0));
mysys_var=0; // Safety (shouldn't be needed)