projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3ebe138
)
rbd: plug rbd_dev->header.object_prefix memory leak
author
Ilya Dryomov
<idryomov@gmail.com>
Mon, 31 Aug 2015 15:22:10 +0000
(18:22 +0300)
committer
Ilya Dryomov
<idryomov@gmail.com>
Tue, 8 Sep 2015 20:14:30 +0000
(23:14 +0300)
Need to free object_prefix when rbd_dev_v2_snap_context() fails, but
only if this is the first time we are reading in the header.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Alex Elder <elder@linaro.org>
drivers/block/rbd.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/block/rbd.c
b/drivers/block/rbd.c
index 324bf35ec4dd65631d75771fc77fdd70869ca26c..69d03aa46d0dbbc16fbd0d6b07a7c7c0026fb374 100644
(file)
--- a/
drivers/block/rbd.c
+++ b/
drivers/block/rbd.c
@@
-4720,7
+4720,10
@@
static int rbd_dev_v2_header_info(struct rbd_device *rbd_dev)
}
ret = rbd_dev_v2_snap_context(rbd_dev);
- dout("rbd_dev_v2_snap_context returned %d\n", ret);
+ if (ret && first_time) {
+ kfree(rbd_dev->header.object_prefix);
+ rbd_dev->header.object_prefix = NULL;
+ }
return ret;
}