Files
linux/drivers/block
Zheng Bin 579dd91ab3 nbd: Fix memory leak in nbd_add_socket
When adding first socket to nbd, if nsock's allocation failed, the data
structure member "config->socks" was reallocated, but the data structure
member "config->num_connections" was not updated. A memory leak will occur
then because the function "nbd_config_put" will free "config->socks" only
when "config->num_connections" is not zero.

Fixes: 03bf73c315 ("nbd: prevent memory leak")
Reported-by: syzbot+934037347002901b8d2a@syzkaller.appspotmail.com
Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-07-08 15:42:18 -06:00
..
2020-05-27 05:21:23 -06:00
2019-11-28 10:40:47 -07:00
2020-03-27 10:23:43 -06:00
2020-07-08 15:42:18 -06:00
2020-03-27 10:23:43 -06:00
2020-06-01 23:32:35 +02:00
2018-11-09 08:14:14 -07:00