mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 15:42:46 +00:00
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
1 changed files with 4 additions and 1 deletions
|
@ -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 a new issue