Hi,
On 2022/10/18 14:32, Marc-André Lureau wrote:
> Hi
>
> On Tue, Oct 18, 2022 at 8:47 AM Miaoqian Lin wrote:
>
> We should use g_strfreev to free the memory allocated by g_strsplit().
> Use g_free() will cause a memory leak.
>
> Signed-off-by: Miaoqian L
We should use g_strfreev to free the memory allocated by g_strsplit().
Use g_free() will cause a memory leak.
Signed-off-by: Miaoqian Lin
---
qga/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qga/main.c b/qga/main.c
index 5a9d8252e075..04902076b25d 100644
--- a/qga
This function doesn't release descriptors in one error path,
result in memory leak. Call g_free() to release it.
Fixes: cc01a3f4cadd ("kvm: Support for querying fd-based stats")
Signed-off-by: Miaoqian Lin
---
accel/kvm/kvm-all.c | 1 +
1 file changed, 1 insertion(+)
diff --git
g_strdup_printf() allocated memory for path, we should free it with
g_free() when no longer needed.
Signed-off-by: Miaoqian Lin
---
tests/qtest/npcm7xx_pwm-test.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/qtest/npcm7xx_pwm-test.c b/tests/qtest/npcm7xx_pwm-test.c
index
When kobject_init_and_add() fails, entry should be freed just like
when sysfs_create_bin_file() fails.
Signed-off-by: Miaoqian Lin
---
drivers/firmware/qemu_fw_cfg.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/firmware/qemu_fw_cfg.c b/drivers/firmware/qemu_fw_cfg.c
index