Skip to content

Commit

Permalink
xen-blkback: really don't leak mode property
Browse files Browse the repository at this point in the history
Commit 9d09260 ("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>
  • Loading branch information
Jan Beulich authored and Konrad Rzeszutek Wilk committed Jul 22, 2016
1 parent 5304394 commit aea305e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/block/xen-blkback/xenbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit aea305e

Please sign in to comment.