[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241126021819.18663-1-heminhong@kylinos.cn>
Date: Tue, 26 Nov 2024 10:18:19 +0800
From: Minhong He <heminhong@...inos.cn>
To: razor@...ckwall.org
Cc: heminhong@...inos.cn,
netdev@...r.kernel.org,
stephen@...workplumber.org,
roopa@...dia.com,
bridge@...ts.linux-foundation.org
Subject: [PATCH iproute2 v2] bridge: fix memory leak in error path
The 'json' object doesn't free when 'rtnl_dump_filter()' fails to process,
fix it.
Signed-off-by: Minhong He <heminhong@...inos.cn>
---
bridge/mst.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/bridge/mst.c b/bridge/mst.c
index 32f64aba..37362c45 100644
--- a/bridge/mst.c
+++ b/bridge/mst.c
@@ -153,6 +153,7 @@ static int mst_show(int argc, char **argv)
if (rtnl_dump_filter(&rth, print_msts, stdout) < 0) {
fprintf(stderr, "Dump terminated\n");
+ delete_json_obj();
return -1;
}
--
2.25.1
Powered by blists - more mailing lists