diff options
author | 2020-06-29 09:23:49 +0800 | |
---|---|---|
committer | 2020-07-08 15:42:18 -0600 | |
commit | 579dd91ab3a5446b148e7f179b6596b270dace46 (patch) | |
tree | 03f155748825eba1c7afbdc19aa714e8cce8c540 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | blk-mq: consider non-idle request as "inflight" in blk_mq_rq_inflight() (diff) | |
download | linux-rng-579dd91ab3a5446b148e7f179b6596b270dace46.tar.xz linux-rng-579dd91ab3a5446b148e7f179b6596b270dace46.zip |
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: 03bf73c315ed ("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>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions