summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authorunknown <knielsen@mysql.com>2006-05-15 18:07:18 +0200
committerunknown <knielsen@mysql.com>2006-05-15 18:07:18 +0200
commita046322b4e61aaef3db9efc9e85477792085c453 (patch)
treec90b581837f256bc8b3e0cb47cafcb159c99a19f /libmysql
parent0a22763fa621e0d376e3e72febe2ad5df008a202 (diff)
downloadmariadb-git-a046322b4e61aaef3db9efc9e85477792085c453.tar.gz
Fix two Valgrind memory leak warnings.
client/mysqlbinlog.cc: Now my_end() deallocates DBUG by default, but that fails in mysqlbinlog because of global destructors that use DBUG. dbug/dbug.c: Add a facility to deallocate the debug stack, to avoid memory leak warnings in Valgrind. include/my_dbug.h: Add a facility to deallocate the debug stack, to avoid memory leak warnings in Valgrind. include/my_sys.h: Change my_end() to deallocate DBUG memory by default (can be disabled with MY_DONT_FREE_DBUG option). libmysql/libmysql.c: Do not deallocate DBUG during cleanup. mysys/my_init.c: Change my_end() to deallocate DBUG memory by default (can be disabled with MY_DONT_FREE_DBUG option). sql/mysqld.cc: Add missing my_thread_end() call, seems to occasionally trigger a memory leak (not repeatable).
Diffstat (limited to 'libmysql')
-rw-r--r--libmysql/libmysql.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index bfec476fde3..511c40c4335 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -178,7 +178,7 @@ void STDCALL mysql_server_end()
/* If library called my_init(), free memory allocated by it */
if (!org_my_init_done)
{
- my_end(0);
+ my_end(MY_DONT_FREE_DBUG);
#ifndef THREAD
/* Remove TRACING, if enabled by mysql_debug() */
DBUG_POP();