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:
parent
af622b8666
commit
fa9765323a
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue