summaryrefslogtreecommitdiff
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 08:15:08 -0600
commitfa9765323a93473d3853d04c9903958453c92ad4 (patch)
treeba9a0ea9a1221ad936fabb106af7cfd0818ed592 /drivers/block/nbd.c
parentaf622b86665881ffa96bc77fb89c94fae02cfa6b (diff)
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 'drivers/block/nbd.c')
-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;