diff options
author | Samuel Just <samuelj@hq.newdream.net> | 2011-01-07 14:23:04 -0800 |
---|---|---|
committer | Samuel Just <samuelj@hq.newdream.net> | 2011-01-07 14:25:03 -0800 |
commit | a64ddbb6869d7b71d18d4b3971def8e56ce76f8c (patch) | |
tree | d51817a1de28cc34afe8299c307ca367de5ff80e | |
parent | 8665370030e5e79de1b4252ab7cdca714b836a93 (diff) | |
download | ceph-a64ddbb6869d7b71d18d4b3971def8e56ce76f8c.tar.gz |
ReplicatedPG: get_object_context ssc refcount leak
If obc->obs.ssc is non-null, the second get_snapset_context ends up
leaking a snapset reference.
Signed-off-by: Samuel Just <samuelj@hq.newdream.net>
-rw-r--r-- | src/osd/ReplicatedPG.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index ecf1677ba20..0245b918484 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -2339,7 +2339,7 @@ ReplicatedPG::ObjectContext *ReplicatedPG::get_object_context(const sobject_t& s obc = new ObjectContext(oi, true, ssc); } - if (can_create) + if (can_create && !obc->obs.ssc) obc->obs.ssc = get_snapset_context(soid.oid, true); if (r >= 0) { |