summaryrefslogtreecommitdiffstats
path: root/drivers/block/nbd.c
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2017-05-23 17:49:55 +0200
committerJens Axboe <axboe@fb.com>2017-05-30 16:15:08 +0200
commitfa9765323a93473d3853d04c9903958453c92ad4 (patch)
treeba9a0ea9a1221ad936fabb106af7cfd0818ed592 /drivers/block/nbd.c
parentnbd: nbd_reset() call in nbd_dev_add() is redundant (diff)
downloadlinux-fa9765323a93473d3853d04c9903958453c92ad4.tar.xz
linux-fa9765323a93473d3853d04c9903958453c92ad4.zip
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 <idryomov@gmail.com> Reviewed-by: Josef Bacik <jbacik@fb.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to '')
-rw-r--r--drivers/block/nbd.c1
1 files changed, 1 insertions, 0 deletions
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;