]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
FileStore: fix resource leak in queue_transactions() blackhole case
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Sat, 1 Mar 2014 10:53:09 +0000 (11:53 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Sat, 1 Mar 2014 10:53:09 +0000 (11:53 +0100)
CID 1135931 (#1 of 1): Resource leak (RESOURCE_LEAK)
 leaked_storage: Variable "ondisk" going out of scope leaks the storage it
 points to.

CID 1135932 (#1 of 1): Resource leak (RESOURCE_LEAK)
 leaked_storage: Variable "onreadable" going out of scope leaks the storage
 it points to.

CID 1135933 (#1 of 1): Resource leak (RESOURCE_LEAK)
 leaked_storage: Variable "onreadable_sync" going out of scope leaks the
 storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/os/FileStore.cc

index 376c39776db7d419614a557d6ce355bab2217f56..cef1d187c61dc1c1b90009b4720387b730bda3b4 100644 (file)
@@ -1736,6 +1736,9 @@ int FileStore::queue_transactions(Sequencer *posr, list<Transaction*> &tls,
     tls, &onreadable, &ondisk, &onreadable_sync);
   if (g_conf->filestore_blackhole) {
     dout(0) << "queue_transactions filestore_blackhole = TRUE, dropping transaction" << dendl;
+    delete ondisk;
+    delete onreadable;
+    delete onreadable_sync;
     return 0;
   }