diff options
author | Sage Weil <sage@newdream.net> | 2011-05-12 19:13:54 -0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2011-05-12 23:59:14 -0400 |
commit | 11f770027b5c0de16544f3ec82b5c6f9f8d5a644 (patch) | |
tree | 7a64ef3a9a47ddd19dd22d50059a266cf626ddee /drivers | |
parent | 446cc6345d3de6571bdd0840f48aca441488a28d (diff) |
rbd: fix leak of ops struct
The ops vector must be freed by the rbd_do_request caller.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/rbd.c | 6 |
1 files changed, 5 insertions, 1 deletions
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, | |||
996 | ops, | 996 | ops, |
997 | num_reply, | 997 | num_reply, |
998 | rbd_req_cb, 0, NULL); | 998 | rbd_req_cb, 0, NULL); |
999 | |||
1000 | rbd_destroy_ops(ops); | ||
999 | done: | 1001 | done: |
1000 | kfree(seg_name); | 1002 | kfree(seg_name); |
1001 | return ret; | 1003 | return ret; |
@@ -1063,7 +1065,9 @@ static int rbd_req_sync_notify_ack(struct rbd_device *dev, | |||
1063 | { | 1065 | { |
1064 | struct ceph_osd_req_op *ops; | 1066 | struct ceph_osd_req_op *ops; |
1065 | struct page **pages = NULL; | 1067 | struct page **pages = NULL; |
1066 | int ret = rbd_create_rw_ops(&ops, 1, CEPH_OSD_OP_NOTIFY_ACK, 0); | 1068 | int ret; |
1069 | |||
1070 | ret = rbd_create_rw_ops(&ops, 1, CEPH_OSD_OP_NOTIFY_ACK, 0); | ||
1067 | if (ret < 0) | 1071 | if (ret < 0) |
1068 | return ret; | 1072 | return ret; |
1069 | 1073 | ||