local_err is not initialized to NULL, it will cause a assert error as below:
qemu/util/error.c:59: error_setv: Assertion `*errp == NULL' failed.
Fixes: c6447510690
Reported-by: Euler Robot
Signed-off-by: Pan Nengyuan
Reviewed-by: Stefano Garzarella
---
Cc: Kevin Wolf
Cc: Max Reitz
Cc
'local_err' seems forgot to propagate in error path, it'll cause
a memleak. Fix it.
Reported-by: Euler Robot
Signed-off-by: Pan Nengyuan
Reviewed-by: Kevin Wolf
Reviewed-by: Li Qiang
---
Cc: Kevin Wolf
Cc: Max Reitz
Cc: Markus Armbruster
Cc: qemu-block@nongnu.org
---
- V2: no changes in v2
local_err is not initialized to NULL, it will cause a assert error as below:
qemu/util/error.c:59: error_setv: Assertion `*errp == NULL' failed.
Fixes: c6447510690
Reported-by: Euler Robot
Signed-off-by: Pan Nengyuan
---
Cc: Kevin Wolf
Cc: Max Reitz
Cc: Aarushi Mehta
Cc: qemu-block
'local_err' seems forgot to propagate in error path, it'll cause
a memleak. Fix it.
Reported-by: Euler Robot
Signed-off-by: Pan Nengyuan
---
Cc: Kevin Wolf
Cc: Max Reitz
Cc: Markus Armbruster
Cc: qemu-block@nongnu.org
---
blockdev.c | 1 +
1 file changed, 1 insertion(+)
diff --git
/sdb/qemu/hw/core/qdev.c:891
#6 0x5562cd39cd45 in property_set_bool /mnt/sdb/qemu/qom/object.c:2238
Reported-by: Euler Robot
Signed-off-by: Pan Nengyuan
Reviewed-by: Stefano Garzarella
---
v2->v1:
- Fix incorrect free in v1, it will cause a uaf.
---
Cc: Stefan Hajnoczi
Cc: Kevin Wolf
/sdb/qemu/hw/core/qdev.c:891
#6 0x5562cd39cd45 in property_set_bool /mnt/sdb/qemu/qom/object.c:2238
Reported-by: Euler Robot
Signed-off-by: Pan Nengyuan
Reviewed-by: Stefano Garzarella
---
v2->v1:
- Fix incorrect free in v1, it will cause a uaf.
---
Cc: Stefan Hajnoczi
Cc: Kevin Wolf
On 3/27/2020 4:41 PM, Stefano Garzarella wrote:
> On Fri, Mar 27, 2020 at 11:56:49AM +0800, Pan Nengyuan wrote:
>> virtio_vqs forgot to free on the error path in realize(). Fix that.
>>
>> The asan stack:
>> Direct leak of 14336 byte(s) in 1 object(s) allocated fro
/sdb/qemu/hw/core/qdev.c:891
#6 0x5562cd39cd45 in property_set_bool /mnt/sdb/qemu/qom/object.c:2238
Reported-by: Euler Robot
Signed-off-by: Pan Nengyuan
---
v2->v1:
- Fix incorrect free in v1, it will cause a uaf.
---
Cc: Stefan Hajnoczi
Cc: Kevin Wolf
Cc: Max Reitz
Cc: qemu-bl
/sdb/qemu/hw/core/qdev.c:891
#6 0x5562cd39cd45 in property_set_bool /mnt/sdb/qemu/qom/object.c:2238
Reported-by: Euler Robot
Signed-off-by: Pan Nengyuan
---
Cc: Stefan Hajnoczi
Cc: Kevin Wolf
Cc: Max Reitz
Cc: qemu-block@nongnu.org
---
hw/block/virtio-blk.c | 8 ++--
1 file changed, 6
-by: Pan Nengyuan
---
v2->v1:
- Instead of freeing part of props in collect_image_check(), do discard the old
check object and allocate a new one in the caller to make more sense.(suggested
by Max Reitz)
---
qemu-img.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/qemu-img.c b/qemu-im
/qemu-new/qemu_test/qemu/block/qcow2.c:3668
#18 0x55d7eac1c678 in bdrv_create_co_entry
/mnt/sdb/qemu-new/qemu_test/qemu/block.c:485
#19 0x55d7eb0024d2 in coroutine_trampoline
/mnt/sdb/qemu-new/qemu_test/qemu/util/coroutine-ucontext.c:115
Reported-by: Euler Robot
Signed-off-by: Pan Nengyuan
eck object and allocate a new one in the caller to make more
sense.(suggested by Max Reitz)
Pan Nengyuan (2):
block/qcow2: do free crypto_opts in qcow2_close()
qemu-img: free memory before re-assign
block/qcow2.c | 1 +
qemu-img.c| 2 ++
2 files changed, 3 insertions(+)
--
2.18.2
On 2/26/2020 6:13 PM, Max Reitz wrote:
> On 26.02.20 04:30, Pan Nengyuan wrote:
>> collect_image_check() is called twice in img_check(), the filename/format
>> will be alloced without free the original memory.
>> It is not a big deal since the process will exit a
This series fix two small memleaks.
1. 'crypto_opts' forgot to free in qcow2_close(), do this cleanup in
qcow2_close();
2. Do free filename/format in collect_image_check() when we re-allocate it.
Pan Nengyuan (2):
block/qcow2: do free crypto_opts in qcow2_close()
qemu-img: free memory
/qemu-new/qemu_test/qemu/block/qcow2.c:3668
#18 0x55d7eac1c678 in bdrv_create_co_entry
/mnt/sdb/qemu-new/qemu_test/qemu/block.c:485
#19 0x55d7eb0024d2 in coroutine_trampoline
/mnt/sdb/qemu-new/qemu_test/qemu/util/coroutine-ucontext.c:115
Reported-by: Euler Robot
Signed-off-by: Pan Nengyuan
-by: Pan Nengyuan
---
qemu-img.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/qemu-img.c b/qemu-img.c
index 2b4562b9d9..bcbca6c9a2 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -638,6 +638,8 @@ static int collect_image_check(BlockDriverState *bs,
return ret;
}
+g_free
On 2/21/2020 7:31 PM, Stefan Hajnoczi wrote:
> On Thu, Feb 13, 2020 at 09:28:07AM +0800, pannengy...@huawei.com wrote:
>> diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c
>> index 2eba8b9db0..ed6a5cc03b 100644
>> --- a/hw/block/vhost-user-blk.c
>> +++
.@huawei.com wrote:
>> From: Pan Nengyuan
>>
>> top->opaque is aleardy malloced in bdrv_new_open_driver(), and then change
>> the pointer but without freeing it. It will cause a memory leak, the leak
>> stack is as follow:
>>
>> Direct leak of 24 byte(s)
On 1/14/2020 6:56 AM, John Snow wrote:
> CC qemu-block
>
> On 1/13/20 1:20 AM, pannengy...@huawei.com wrote:
>> From: Pan Nengyuan
>>
>> scsi_block_realize() use scsi_realize() to init some props, but
>> these props is not defined in scsi_block_disk_propert
On 1/8/2020 6:24 AM, Eric Blake wrote:
> On 1/5/20 7:54 PM, pannengy...@huawei.com wrote:
>> From: Pan Nengyuan
>>
>> Fixes:
>> /mnt/sdb/qemu/nbd/server.c: In function 'nbd_handle_request':
>> /mnt/sdb/qemu/nbd/server.c:2313:9: error: 'ret' may be used u
On 2019/12/4 15:19, Vladimir Sementsov-Ogievskiy wrote:
> 04.12.2019 6:12, pannengyuan wrote:
>>
>>
>> On 2019/12/4 1:38, Vladimir Sementsov-Ogievskiy wrote:
>>> Hi!
>>>
>>> First, please, when sending more than one patch, create a cover-letter.
>>> Also,
>>> summarize (in cover letter) what
21 matches
Mail list logo