diff options
author | Jan Beulich <JBeulich@suse.com> | 2016-07-07 09:38:13 +0200 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2016-07-22 14:24:43 +0200 |
commit | aea305e11f7a7af12aa2beb7c7e053a338659c49 (patch) | |
tree | 5a12abe60faba674f3f4dd15c19e59efd259da4e /drivers/block | |
parent | xen-blkback: constify instance of "struct attribute_group" (diff) | |
download | linux-aea305e11f7a7af12aa2beb7c7e053a338659c49.tar.xz linux-aea305e11f7a7af12aa2beb7c7e053a338659c49.zip |
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; |