summaryrefslogtreecommitdiff
path: root/sql/rpl_utility.cc
diff options
context:
space:
mode:
authorVenkatesh Duggirala <venkatesh.duggirala@oracle.com>2013-01-26 15:03:01 +0530
committerVenkatesh Duggirala <venkatesh.duggirala@oracle.com>2013-01-26 15:03:01 +0530
commit08a22ba1c9b0513d9a32509bbfe5b49261ee7676 (patch)
tree8a96059b4be735b010926a0764152a93e994f5ed /sql/rpl_utility.cc
parent527c5817643e941f92d822612ff80a15f8a4e4f5 (diff)
downloadmariadb-git-08a22ba1c9b0513d9a32509bbfe5b49261ee7676.tar.gz
Bug#16056813-MEMORY LEAK ON FILTERED SLAVE
Due to not resetting a member (last_added) of Deferred events class inside a clean up function (Deferred_log_events::rewind), there is a memory leak on filtered slaves. Fix: Resetting last_added to NULL in rewind() function. sql/rpl_utility.cc: Resetting last_added to NULL to avoid memory leak
Diffstat (limited to 'sql/rpl_utility.cc')
-rw-r--r--sql/rpl_utility.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/rpl_utility.cc b/sql/rpl_utility.cc
index 8efb376b5b6..2643f2d6059 100644
--- a/sql/rpl_utility.cc
+++ b/sql/rpl_utility.cc
@@ -1117,6 +1117,7 @@ void Deferred_log_events::rewind()
Log_event *ev= *(Log_event **) dynamic_array_ptr(&array, i);
delete ev;
}
+ last_added= NULL;
if (array.elements > array.max_element)
freeze_size(&array);
reset_dynamic(&array);