diff options
author | Ilya Dryomov <ilya.dryomov@inktank.com> | 2014-06-27 21:46:33 +0400 |
---|---|---|
committer | Ilya Dryomov <ilya.dryomov@inktank.com> | 2014-07-08 15:08:46 +0400 |
commit | fbba11b3bec52ff560cb42d102f61341049defb0 (patch) | |
tree | ef88741110ec7a80722870dd27785003d802f873 /drivers/block/rbd.c | |
parent | 494d77bf8fd732f164b91710bd522ee38acb4c2e (diff) | |
download | blackbird-op-linux-fbba11b3bec52ff560cb42d102f61341049defb0.tar.gz blackbird-op-linux-fbba11b3bec52ff560cb42d102f61341049defb0.zip |
rbd: do not leak image_id in rbd_dev_v2_parent_info()
image_id is leaked if the parent happens to have been recorded already.
Fix it.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Diffstat (limited to 'drivers/block/rbd.c')
-rw-r--r-- | drivers/block/rbd.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index d99aa81774f8..adedb393b374 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -4072,6 +4072,8 @@ static int rbd_dev_v2_parent_info(struct rbd_device *rbd_dev) parent_spec->snap_id = snap_id; rbd_dev->parent_spec = parent_spec; parent_spec = NULL; /* rbd_dev now owns this */ + } else { + kfree(image_id); } /* |