tests/qtest/fuzz: fix memleak in qos_fuzz.c
authorDmitry Frolov <frolov@swemel.ru>
Tue, 21 May 2024 10:31:08 +0000 (13:31 +0300)
committerThomas Huth <thuth@redhat.com>
Mon, 24 Jun 2024 06:10:06 +0000 (08:10 +0200)
Found with fuzzing for qemu-8.2, but also relevant for master

Signed-off-by: Dmitry Frolov <frolov@swemel.ru>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Alexander Bulekov <alxndr@bu.edu>
Message-ID: <20240521103106.119021-3-frolov@swemel.ru>
Signed-off-by: Thomas Huth <thuth@redhat.com>
tests/qtest/fuzz/qos_fuzz.c

index b71e945c5fb7ee51ab7799bd68758b1044bccb1a..d3839bf9994cffff3cb539a7cf5b897ef10d1fc7 100644 (file)
@@ -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);
     }