mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
rbd: fix double free on rbd_dev->header_name
If rbd_dev_image_probe() in rbd_dev_probe_parent() fails, header_name is freed twice: once in rbd_dev_probe_parent() and then in its caller rbd_dev_image_probe() (rbd_dev_image_probe() is called recursively to handle parent images). rbd_dev_probe_parent() is responsible for probing the parent, so it shouldn't muck with clone's fields. Signed-off-by: Ilya Dryomov <[email protected]> Reviewed-by: Alex Elder <[email protected]>
This commit is contained in:
parent
6dd74e44dc
commit
3ebe138ac6
1 changed files with 0 additions and 1 deletions
|
|
@ -5201,7 +5201,6 @@ static int rbd_dev_probe_parent(struct rbd_device *rbd_dev)
|
|||
out_err:
|
||||
if (parent) {
|
||||
rbd_dev_unparent(rbd_dev);
|
||||
kfree(rbd_dev->header_name);
|
||||
rbd_dev_destroy(parent);
|
||||
} else {
|
||||
rbd_put_client(rbdc);
|
||||
|
|
|
|||
Loading…
Reference in a new issue