All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libceph: fix a memory leak in handle_watch_notify
@ 2014-09-11  0:20 roy.qing.li
  2014-09-11  1:41 ` Alex Elder
  0 siblings, 1 reply; 5+ messages in thread
From: roy.qing.li @ 2014-09-11  0:20 UTC (permalink / raw)
  To: sage, ceph-devel

From: Li RongQing <roy.qing.li@gmail.com> 

event_work should be freed when adding it to queue failed

Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
---
 net/ceph/osd_client.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index 30f6faf..1e1b4f1 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -2323,6 +2323,7 @@ static void handle_watch_notify(struct ceph_osd_client *osdc,
 		event_work->opcode = opcode;
 		if (!queue_work(osdc->notify_wq, &event_work->work)) {
 			dout("WARNING: failed to queue notify event work\n");
+			kfree(event_work);
 			goto done_err;
 		}
 	}
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-09-11 11:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-11  0:20 [PATCH] libceph: fix a memory leak in handle_watch_notify roy.qing.li
2014-09-11  1:41 ` Alex Elder
2014-09-11  8:31   ` Ilya Dryomov
2014-09-11 10:50     ` Alex Elder
2014-09-11 11:11       ` Ilya Dryomov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.