diff options
author | Danny Al-Gaaf <danny.al-gaaf@bisect.de> | 2013-05-13 11:50:37 +0200 |
---|---|---|
committer | Danny Al-Gaaf <danny.al-gaaf@bisect.de> | 2013-05-14 18:39:30 +0200 |
commit | 349cfb41d0d440338e14a788793230c546295743 (patch) | |
tree | 812b25ad8355613b5575628b492bcb370fd6c43a | |
parent | df4c099af477e3197b4b14b9f4242a5b41c2fce5 (diff) | |
download | ceph-349cfb41d0d440338e14a788793230c546295743.tar.gz |
ceph-filestore-dump.cc: cleanup on error case
CID 1019589 (#1 of 1): Resource leak (RESOURCE_LEAK)
leaked_storage: Variable "t" going out of scope leaks the
storage it points to.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
-rw-r--r-- | src/tools/ceph-filestore-dump.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tools/ceph-filestore-dump.cc b/src/tools/ceph-filestore-dump.cc index 5587ef4dcff..1c09de6c0a3 100644 --- a/src/tools/ceph-filestore-dump.cc +++ b/src/tools/ceph-filestore-dump.cc @@ -357,7 +357,7 @@ void remove_coll(ObjectStore *store, const coll_t &coll) r = store->collection_list_partial(coll, next, 200, 300, 0, &objects, &next); if (r < 0) - return; + goto out; for (vector<hobject_t>::iterator i = objects.begin(); i != objects.end(); ++i, ++num) { @@ -380,6 +380,7 @@ void remove_coll(ObjectStore *store, const coll_t &coll) } t->remove_collection(coll); store->apply_transaction(*t); +out: delete t; } |