From ec9dba72124597b7224bbfe75960386dc320f4bd Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 4 Jun 2023 18:34:01 +0200 Subject: [PATCH] system-linux: fix memory leak in system_bridge_vlan_check The message passed to nl_send_auto_complete still needs to be freed even in the normal path Fixes: https://github.com/openwrt/netifd/issues/4 Fixes: 85f01c44a950 ("bridge: check bridge port vlan membership on link-up events") Signed-off-by: Felix Fietkau --- system-linux.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/system-linux.c b/system-linux.c index 432581e..cc15537 100644 --- a/system-linux.c +++ b/system-linux.c @@ -2205,11 +2205,8 @@ int system_bridge_vlan_check(struct device *dev, char *ifname) } } - goto out; - free: nlmsg_free(msg); -out: nl_cb_put(cb); return data.ret; } -- 2.30.2