projects
/
platform
/
kernel
/
linux-exynos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
494d77b
)
rbd: do not leak image_id in rbd_dev_v2_parent_info()
author
Ilya Dryomov
<ilya.dryomov@inktank.com>
Fri, 27 Jun 2014 17:46:33 +0000
(21:46 +0400)
committer
Ilya Dryomov
<ilya.dryomov@inktank.com>
Tue, 8 Jul 2014 11:08:46 +0000
(15:08 +0400)
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>
drivers/block/rbd.c
patch
|
blob
|
history
diff --git
a/drivers/block/rbd.c
b/drivers/block/rbd.c
index
d99aa81
..
adedb39
100644
(file)
--- 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);
}
/*