nbd: don't leak nbd_config

nbd_config is allocated in nbd_alloc_config(), but never freed.

Fixes: 5ea8d10802 ("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>
This commit is contained in:
Ilya Dryomov 2017-05-23 17:49:55 +02:00 committed by Jens Axboe
parent af622b8666
commit fa9765323a

View File

@ -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;