From: Sage Weil Date: Thu, 12 May 2011 23:13:54 +0000 (-0700) Subject: rbd: fix leak of ops struct X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=11f770027b5c0de16544f3ec82b5c6f9f8d5a644;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git rbd: fix leak of ops struct The ops vector must be freed by the rbd_do_request caller. Signed-off-by: Sage Weil --- diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 3e904717c1c0..2146cab1c61b 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -996,6 +996,8 @@ static int rbd_do_op(struct request *rq, ops, num_reply, rbd_req_cb, 0, NULL); + + rbd_destroy_ops(ops); done: kfree(seg_name); return ret; @@ -1063,7 +1065,9 @@ static int rbd_req_sync_notify_ack(struct rbd_device *dev, { struct ceph_osd_req_op *ops; struct page **pages = NULL; - int ret = rbd_create_rw_ops(&ops, 1, CEPH_OSD_OP_NOTIFY_ACK, 0); + int ret; + + ret = rbd_create_rw_ops(&ops, 1, CEPH_OSD_OP_NOTIFY_ACK, 0); if (ret < 0) return ret;