From: Felix Fietkau Date: Sun, 4 Jun 2023 16:34:01 +0000 (+0200) Subject: system-linux: fix memory leak in system_bridge_vlan_check X-Git-Url: http://git.openwrt.org/?p=project%2Fnetifd.git;a=commitdiff_plain;h=ec9dba72124597b7224bbfe75960386dc320f4bd 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 --- 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; }