Re: [PATCH] qemu-nbd: Fix a memleak in nbd_client_thread()

2020-12-03 Thread Eric Blake
On 12/1/20 8:02 PM, Alex Chen wrote: > On 2020/12/2 4:15, Eric Blake wrote: >> While the patch looks correct, we have a lot of duplication. Simpler >> might be a solution with only one exit label altogether: >> > > Thanks for your review, I will modify the patch and send patch v2 according > to

Re: [PATCH] qemu-nbd: Fix a memleak in nbd_client_thread()

2020-12-01 Thread Alex Chen
On 2020/12/2 4:15, Eric Blake wrote: > On 12/1/20 12:13 AM, Alex Chen wrote: >> 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, now the 'out' label is useless, delete it. >> >> Reported-by: Eule

Re: [PATCH] qemu-nbd: Fix a memleak in nbd_client_thread()

2020-12-01 Thread Eric Blake
On 12/1/20 12:13 AM, Alex Chen wrote: > 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, now the 'out' label is useless, delete it. > > Reported-by: Euler Robot > Signed-off-by: Alex Chen > --- >

[PATCH] qemu-nbd: Fix a memleak in nbd_client_thread()

2020-11-30 Thread Alex Chen
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, now the 'out' label is useless, delete it. Reported-by: Euler Robot Signed-off-by: Alex Chen --- qemu-nbd.c | 3 +-- 1 file changed, 1 insertion(+), 2