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:
Jan Beulich 2016-07-07 01:38:13 -06:00 committed by Konrad Rzeszutek Wilk
parent 530439484d
commit aea305e11f
1 changed files with 4 additions and 1 deletions

View File

@ -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;