提交 fa976532 编写于 作者: I Ilya Dryomov 提交者: Jens Axboe

nbd: don't leak nbd_config

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

Fixes: 5ea8d108 ("nbd: separate out the config information")
Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
Reviewed-by: NJosef Bacik <jbacik@fb.com>
Signed-off-by: NJens Axboe <axboe@fb.com>
上级 af622b86
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册