1
0
Fork 0

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>
hifive-unleashed-5.1
Ilya Dryomov 2017-05-23 17:49:55 +02:00 committed by Jens Axboe
parent af622b8666
commit fa9765323a
1 changed files with 1 additions and 0 deletions

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;