Thread (5 messages) read the whole thread 5 messages, 3 authors, 2024-12-02

Re: [PATCH iproute2 v2] bridge: fix memory leak in error path

From: Nikolay Aleksandrov <razor@blackwall.org>
Date: 2024-11-26 09:20:04
Also in: bridge

On 26/11/2024 04:18, Minhong He wrote:
quoted hunk ↗ jump to hunk
The 'json' object doesn't free when 'rtnl_dump_filter()' fails to process,
fix it.

Signed-off-by: Minhong He <redacted>
---
 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;
 	}
 
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help