Commit aea305e1 authored by Jan Beulich's avatar Jan Beulich Committed by Konrad Rzeszutek Wilk

xen-blkback: really don't leak mode property

Commit 9d092603 ("xen-blkback: do not leak mode property") left one
path unfixed; correct this.
Acked-by: default avatarJens Axboe <axboe@kernel.dk>
Acked-by: default avatarRoger Pau Monné <roger.pau@citrix.com>
Signed-off-by: default avatarJan Beulich <jbeulich@suse.com>
Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
parent 53043948
......@@ -715,8 +715,11 @@ static void backend_changed(struct xenbus_watch *watch,
/* Front end dir is a number, which is used as the handle. */
err = kstrtoul(strrchr(dev->otherend, '/') + 1, 0, &handle);
if (err)
if (err) {
kfree(be->mode);
be->mode = NULL;
return;
}
be->major = major;
be->minor = minor;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment