diff options
author | Alex Chen | 2020-12-08 14:49:44 +0100 |
---|---|---|
committer | Eric Blake | 2021-01-20 21:48:05 +0100 |
commit | af74b550bd8ee02c0fdeaa595d5e6f677969f39b (patch) | |
tree | 30a9068ccd64d621ffe94ffa425061352cf9218c /nbd | |
parent | qemu-nbd: Fix a memleak in qemu_nbd_client_list() (diff) | |
download | qemu-af74b550bd8ee02c0fdeaa595d5e6f677969f39b.tar.gz qemu-af74b550bd8ee02c0fdeaa595d5e6f677969f39b.tar.xz qemu-af74b550bd8ee02c0fdeaa595d5e6f677969f39b.zip |
qemu-nbd: Fix a memleak in nbd_client_thread()
When the qio_channel_socket_connect_sync() fails
we should goto 'out_socket' label to free the 'sioc' instead of
goto 'out' label.
In addition, there's a lot of redundant code in the successful branch
and the error branch, optimize it.
Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Alex Chen <alex.chen@huawei.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20201208134944.27962-1-alex.chen@huawei.com>
Diffstat (limited to 'nbd')
0 files changed, 0 insertions, 0 deletions