summaryrefslogtreecommitdiffstats
path: root/nbd
diff options
context:
space:
mode:
authorAlex Chen2020-12-08 14:49:44 +0100
committerEric Blake2021-01-20 21:48:05 +0100
commitaf74b550bd8ee02c0fdeaa595d5e6f677969f39b (patch)
tree30a9068ccd64d621ffe94ffa425061352cf9218c /nbd
parentqemu-nbd: Fix a memleak in qemu_nbd_client_list() (diff)
downloadqemu-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