On 09/10/2014 07:20 PM, roy.qing...@gmail.com wrote:
From: Li RongQing <roy.qing...@gmail.com>

event_work should be freed when adding it to queue failed

Signed-off-by: Li RongQing <roy.qing...@gmail.com>

Looks good.

Reviewed-by: Alex Elder <el...@linaro.org>

---
  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;
                }
        }


--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to