diff options
author | Jan Beulich <JBeulich@suse.com> | 2016-07-07 10:38:13 +0300 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2016-07-22 15:24:43 +0300 |
commit | aea305e11f7a7af12aa2beb7c7e053a338659c49 (patch) | |
tree | 5a12abe60faba674f3f4dd15c19e59efd259da4e /drivers/block | |
parent | 530439484d2d9f2a7f1038b1afd3d3543ecc63f6 (diff) | |
download | linux-aea305e11f7a7af12aa2beb7c7e053a338659c49.tar.xz |
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>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/xen-blkback/xenbus.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/block/xen-blkback/xenbus.c b/drivers/block/xen-blkback/xenbus.c index b44eaf40bb29..4a2412127d8f 100644 --- a/drivers/block/xen-blkback/xenbus.c +++ b/drivers/block/xen-blkback/xenbus.c @@ -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; |