xen-blkback: really don't leak mode property
Commit 9d092603cc
("xen-blkback: do not leak mode property") left one
path unfixed; correct this.
Acked-by: Jens Axboe <axboe@kernel.dk>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
This commit is contained in:
parent
530439484d
commit
aea305e11f
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue