]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: fix Extent leak from ~ExtentMap
authorSage Weil <sage@redhat.com>
Tue, 13 Sep 2016 18:28:24 +0000 (14:28 -0400)
committerSage Weil <sage@redhat.com>
Wed, 14 Sep 2016 15:33:55 +0000 (11:33 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BlueStore.h

index d884f2952beb66a8d571dde500218c08606777eb..a8e30061f1b7d30d8da2c727b79877d861cae80d 100644 (file)
@@ -549,6 +549,9 @@ public:
     bufferlist inline_bl;    ///< cached encoded map, if unsharded; empty=>dirty
 
     ExtentMap(Onode *o);
+    ~ExtentMap() {
+      extent_map.clear_and_dispose([&](Extent *e) { delete e; });
+    }
 
     bool encode_some(uint32_t offset, uint32_t length, bufferlist& bl,
                     unsigned *pn);