diff --git a/src/test/filestore/test_idempotent_sequence.cc b/src/test/filestore/test_idempotent_sequence.cc index 818a2554c35..d8f8c33ab51 100644 --- a/src/test/filestore/test_idempotent_sequence.cc +++ b/src/test/filestore/test_idempotent_sequence.cc @@ -91,6 +91,8 @@ int run_diff(std::string& a_path, std::string& a_journal, dout(0) << "no diff" << dendl; } + delete a; + delete b; return ret; } @@ -99,8 +101,10 @@ int run_get_last_op(std::string& filestore_path, std::string& journal_path) FileStore *store = new FileStore(filestore_path, journal_path); int err = store->mount(); - if (err) + if (err) { + delete store; return err; + } coll_t txn_coll("meta"); hobject_t txn_object(sobject_t("txn", CEPH_NOSNAP)); @@ -135,6 +139,7 @@ int run_sequence_to(int val, std::string& filestore_path, err = ::mkdir(filestore_path.c_str(), 0755); if (err) { cerr << filestore_path << " already exists" << std::endl; + delete store; return err; } @@ -149,6 +154,7 @@ int run_sequence_to(int val, std::string& filestore_path, op_sequence.generate(seed, num_txs); store->umount(); + delete store; return 0; }