From c9ec9e179e5a93a51c1b6e492a4f372662b5d033 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Mon, 26 Sep 2011 17:20:05 +0000 Subject: [PATCH] system-linux: free netlink messages after sending --- system-linux.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/system-linux.c b/system-linux.c index d09fd63..4831088 100644 --- a/system-linux.c +++ b/system-linux.c @@ -36,8 +36,10 @@ int system_init(void) static int system_rtnl_call(struct nl_msg *msg) { - return -(nl_send_auto_complete(sock_rtnl, msg) + int s = -(nl_send_auto_complete(sock_rtnl, msg) || nl_wait_for_ack(sock_rtnl)); + nlmsg_free(msg); + return s; } int system_bridge_addbr(struct device *bridge) -- 2.25.1