summaryrefslogtreecommitdiff
path: root/sql/rpl_utility.cc
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2012-06-20 14:23:23 +0200
committerunknown <knielsen@knielsen-hq.org>2012-06-20 14:23:23 +0200
commit166d4c1feb24b2d819af0b13fbf5dbad2b48c731 (patch)
tree5d9ca862bf1fbd2f8c8f660bdb15724c15291ebd /sql/rpl_utility.cc
parent3aef21344f4e0bd0990f5985b00aa18f107ff8c5 (diff)
downloadmariadb-git-166d4c1feb24b2d819af0b13fbf5dbad2b48c731.tar.gz
Fix memory leak introduced with merge of mysql 5.5.
MySQL introduced a class Deferred_log_events. This class keeps a pointer last_added. The code was keeping this pointer around even after the memory pointed to was freed, and later comparing the bogus pointer against other allocated memory. This is illegal, and can randomly produce false equal comparisons depending on whatever the malloc() subsystem decides to return.
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 8b5df149539..388a6c9f9bb 100644
--- a/sql/rpl_utility.cc
+++ b/sql/rpl_utility.cc
@@ -1174,6 +1174,7 @@ void Deferred_log_events::rewind()
freeze_size(&array);
reset_dynamic(&array);
}
+ last_added= NULL;
}
#endif