diff options
author | Alex Chen <alex.chen@huawei.com> | 2020-12-08 13:49:44 +0000 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2021-01-20 14:48:05 -0600 |
commit | af74b550bd8ee02c0fdeaa595d5e6f677969f39b (patch) | |
tree | 30a9068ccd64d621ffe94ffa425061352cf9218c /hw/scsi/virtio-scsi.c | |
parent | 992809bf8bfa4a6ba0765344fb11d41ae7db3280 (diff) | |
download | 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 'hw/scsi/virtio-scsi.c')
0 files changed, 0 insertions, 0 deletions