提交 11f77002 编写于 作者: S Sage Weil

rbd: fix leak of ops struct

The ops vector must be freed by the rbd_do_request caller.
Signed-off-by: NSage Weil <sage@newdream.net>
上级 446cc634
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册