]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG::remove_notify : don't leak the notify object
authorSamuel Just <sam.just@inktank.com>
Thu, 20 Dec 2012 21:29:09 +0000 (13:29 -0800)
committerSamuel Just <sam.just@inktank.com>
Thu, 20 Dec 2012 21:29:14 +0000 (13:29 -0800)
Following remove_notify, there are no other references to
notif, delete it.

Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/ReplicatedPG.cc

index 0d07f7279c9c67a78ed9d35e88f9e3cd335fc966..612dc4a8677bbbd99f6b71703b1427d8bdec0c9c 100644 (file)
@@ -1608,6 +1608,7 @@ void ReplicatedPG::remove_notify(ObjectContext *obc, Watch::Notification *notif)
   obc->notifs.erase(niter);
 
   put_object_context(obc);
+  delete notif;
 }
 
 void ReplicatedPG::remove_watchers_and_notifies()