[Qemu-devel] [PATCH v2 16/30] tests: fix eepro100-test leak

Marc-André Lureau posted 30 patches 8 years, 11 months ago
[Qemu-devel] [PATCH v2 16/30] tests: fix eepro100-test leak
Posted by Marc-André Lureau 8 years, 11 months ago
Spotted by ASAN.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 tests/eepro100-test.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/eepro100-test.c b/tests/eepro100-test.c
index ed23258b0f..bdc8a67d57 100644
--- a/tests/eepro100-test.c
+++ b/tests/eepro100-test.c
@@ -54,6 +54,7 @@ int main(int argc, char **argv)
 
         path = g_strdup_printf("eepro100/%s", models[i]);
         qtest_add_data_func(path, models[i], test_device);
+        g_free(path);
     }
 
     return g_test_run();
-- 
2.11.0.295.gd7dffce1c.dirty


Re: [Qemu-devel] [PATCH v2 16/30] tests: fix eepro100-test leak
Posted by Stefan Weil 8 years, 11 months ago
Am 21.02.2017 um 15:14 schrieb Marc-André Lureau:
> Spotted by ASAN.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  tests/eepro100-test.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tests/eepro100-test.c b/tests/eepro100-test.c
> index ed23258b0f..bdc8a67d57 100644
> --- a/tests/eepro100-test.c
> +++ b/tests/eepro100-test.c
> @@ -54,6 +54,7 @@ int main(int argc, char **argv)
>  
>          path = g_strdup_printf("eepro100/%s", models[i]);
>          qtest_add_data_func(path, models[i], test_device);
> +        g_free(path);
>      }
>  
>      return g_test_run();
> 

Reviewed-by: Stefan Weil <sw@weilnetz.de>