[PATCH] tests/qtest/fuzz: fix memleak in qos_fuzz.c

Dmitry Frolov posted 1 patch 6 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20240521103106.119021-3-frolov@swemel.ru
Maintainers: Alexander Bulekov <alxndr@bu.edu>, Paolo Bonzini <pbonzini@redhat.com>, Bandan Das <bsd@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>, Thomas Huth <thuth@redhat.com>, Darren Kenny <darren.kenny@oracle.com>, Qiuhao Li <Qiuhao.Li@outlook.com>, Laurent Vivier <lvivier@redhat.com>
tests/qtest/fuzz/qos_fuzz.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] tests/qtest/fuzz: fix memleak in qos_fuzz.c
Posted by Dmitry Frolov 6 months, 1 week ago
Found with fuzzing for qemu-8.2, but also relevant for master

Signed-off-by: Dmitry Frolov <frolov@swemel.ru>
---
 tests/qtest/fuzz/qos_fuzz.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/qtest/fuzz/qos_fuzz.c b/tests/qtest/fuzz/qos_fuzz.c
index b71e945c5f..d3839bf999 100644
--- a/tests/qtest/fuzz/qos_fuzz.c
+++ b/tests/qtest/fuzz/qos_fuzz.c
@@ -180,6 +180,7 @@ static void walk_path(QOSGraphNode *orig_path, int len)
 
         fuzz_path_vec = path_vec;
     } else {
+        g_string_free(cmd_line, true);
         g_free(path_vec);
     }
 
-- 
2.43.0
Re: [PATCH] tests/qtest/fuzz: fix memleak in qos_fuzz.c
Posted by Alexander Bulekov 5 months, 2 weeks ago
Reviewed-by: Alexander Bulekov <alxndr@bu.edu>

On 240521 1331, Dmitry Frolov wrote:
> Found with fuzzing for qemu-8.2, but also relevant for master
> 
> Signed-off-by: Dmitry Frolov <frolov@swemel.ru>
> ---
>  tests/qtest/fuzz/qos_fuzz.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tests/qtest/fuzz/qos_fuzz.c b/tests/qtest/fuzz/qos_fuzz.c
> index b71e945c5f..d3839bf999 100644
> --- a/tests/qtest/fuzz/qos_fuzz.c
> +++ b/tests/qtest/fuzz/qos_fuzz.c
> @@ -180,6 +180,7 @@ static void walk_path(QOSGraphNode *orig_path, int len)
>  
>          fuzz_path_vec = path_vec;
>      } else {
> +        g_string_free(cmd_line, true);
>          g_free(path_vec);
>      }
>  
> -- 
> 2.43.0
>
Re: [PATCH] tests/qtest/fuzz: fix memleak in qos_fuzz.c
Posted by Thomas Huth 5 months, 2 weeks ago
On 21/05/2024 12.31, Dmitry Frolov wrote:
> Found with fuzzing for qemu-8.2, but also relevant for master
> 
> Signed-off-by: Dmitry Frolov <frolov@swemel.ru>
> ---
>   tests/qtest/fuzz/qos_fuzz.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/tests/qtest/fuzz/qos_fuzz.c b/tests/qtest/fuzz/qos_fuzz.c
> index b71e945c5f..d3839bf999 100644
> --- a/tests/qtest/fuzz/qos_fuzz.c
> +++ b/tests/qtest/fuzz/qos_fuzz.c
> @@ -180,6 +180,7 @@ static void walk_path(QOSGraphNode *orig_path, int len)
>   
>           fuzz_path_vec = path_vec;
>       } else {
> +        g_string_free(cmd_line, true);
>           g_free(path_vec);
>       }
>   

Reviewed-by: Thomas Huth <thuth@redhat.com>
Re: [PATCH] tests/qtest/fuzz: fix memleak in qos_fuzz.c
Posted by Дмитрий Фролов 5 months, 2 weeks ago
ping

https://patchew.org/QEMU/20240521103106.119021-3-frolov@swemel.ru/

On 21.05.2024 13:31, Dmitry Frolov wrote:
> Found with fuzzing for qemu-8.2, but also relevant for master
>
> Signed-off-by: Dmitry Frolov <frolov@swemel.ru>
> ---
>   tests/qtest/fuzz/qos_fuzz.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/tests/qtest/fuzz/qos_fuzz.c b/tests/qtest/fuzz/qos_fuzz.c
> index b71e945c5f..d3839bf999 100644
> --- a/tests/qtest/fuzz/qos_fuzz.c
> +++ b/tests/qtest/fuzz/qos_fuzz.c
> @@ -180,6 +180,7 @@ static void walk_path(QOSGraphNode *orig_path, int len)
>   
>           fuzz_path_vec = path_vec;
>       } else {
> +        g_string_free(cmd_line, true);
>           g_free(path_vec);
>       }
>