diff --git a/mysys/my_malloc.c b/mysys/my_malloc.c index 719c13a040e..99a15e6f432 100644 --- a/mysys/my_malloc.c +++ b/mysys/my_malloc.c @@ -117,6 +117,7 @@ void *my_malloc(size_t size, myf my_flags) MY_TEST(my_flags & MY_THREAD_SPECIFIC)); update_malloc_size(size + MALLOC_PREFIX_SIZE, MY_TEST(my_flags & MY_THREAD_SPECIFIC)); + TRASH_ALLOC(point, size); DBUG_EXECUTE_IF("simulate_out_of_memory", { /* my_free() handles memory accounting */