From: Jan Beulich Date: Thu, 7 Jul 2016 07:38:13 +0000 (-0600) Subject: xen-blkback: really don't leak mode property X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=aea305e11f7a7af12aa2beb7c7e053a338659c49;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Acked-by: Roger Pau Monné Signed-off-by: Jan Beulich Signed-off-by: Konrad Rzeszutek Wilk --- 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;