From 18219d17b25aa8cbb971ae73f232efe50ea81d83 Mon Sep 17 00:00:00 2001 From: xie xingguo Date: Thu, 10 Nov 2016 18:38:15 +0800 Subject: [PATCH] os/bluestore: fix potential memory leak Call to extent_map.clear_and_dispose() will be noop after extent_map.clear() hence causing memory leak. Signed-off-by: xie xingguo --- src/os/bluestore/BlueStore.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/os/bluestore/BlueStore.h b/src/os/bluestore/BlueStore.h index 89139beb328..0610e19a2b8 100644 --- a/src/os/bluestore/BlueStore.h +++ b/src/os/bluestore/BlueStore.h @@ -624,7 +624,6 @@ public: } void clear() { - extent_map.clear(); extent_map.clear_and_dispose([&](Extent *e) { delete e; }); shards.clear(); inline_bl.clear();