LeakSanitizer found this leak.

Signed-off-by: Akihiko Odaki <[email protected]>
---
 net/net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/net.c b/net/net.c
index bf7e5d9b1258..8cfdd866e7df 100644
--- a/net/net.c
+++ b/net/net.c
@@ -1115,7 +1115,7 @@ static int model_cmp(char **a, char **b)
 
 static void show_nic_models(void)
 {
-    GPtrArray *results = g_ptr_array_new();
+    g_autoptr(GPtrArray) results = g_ptr_array_new_with_free_func(g_free);
     int i;
 
     g_hash_table_foreach_remove(nic_model_help, add_nic_result, results);

---
base-commit: 74f7bf4c59e6b6d50dbc6e124d93440be8be4386
change-id: 20261103-nic-0ac90b69ad3b

Best regards,
--  
Akihiko Odaki <[email protected]>


Reply via email to