From: Ilya Dryomov Date: Tue, 23 May 2017 15:49:55 +0000 (+0200) Subject: nbd: don't leak nbd_config X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fa9765323a93473d3853d04c9903958453c92ad4;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git nbd: don't leak nbd_config nbd_config is allocated in nbd_alloc_config(), but never freed. Fixes: 5ea8d10802ec ("nbd: separate out the config information") Signed-off-by: Ilya Dryomov Reviewed-by: Josef Bacik Signed-off-by: Jens Axboe --- diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index e725d8d5ab0b..f3f191ba8ca4 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -1021,6 +1021,7 @@ static void nbd_config_put(struct nbd_device *nbd) } kfree(config->socks); } + kfree(nbd->config); nbd->config = NULL; nbd->tag_set.timeout = 0;