Re: [PATCH V2] block/nbd: fix memory leak in nbd_open()

2019-11-28 Thread pannengyuan
On 2019/11/28 21:36, Stefano Garzarella wrote: > On Thu, Nov 28, 2019 at 08:09:31PM +0800, pannengy...@huawei.com wrote: >> From: PanNengyuan >> >> In currently implementation there will be a memory leak when >> nbd_client_connect() returns error status. Here is an easy way to >> reproduce: >> >>

Re: [PATCH V2] block/nbd: fix memory leak in nbd_open()

2019-11-28 Thread Stefano Garzarella
On Thu, Nov 28, 2019 at 08:09:31PM +0800, pannengy...@huawei.com wrote: > From: PanNengyuan > > In currently implementation there will be a memory leak when > nbd_client_connect() returns error status. Here is an easy way to > reproduce: > > 1. run qemu-iotests as follow and check the result

[PATCH V2] block/nbd: fix memory leak in nbd_open()

2019-11-28 Thread pannengyuan
From: PanNengyuan In currently implementation there will be a memory leak when nbd_client_connect() returns error status. Here is an easy way to reproduce: 1. run qemu-iotests as follow and check the result with asan: ./check -raw 143 Following is the asan output backtrack: Direct leak of