summaryrefslogtreecommitdiff
path: root/system-linux.c
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2011-09-26 17:20:05 +0000
committerSteven Barth <steven@midlink.org>2011-09-26 17:20:05 +0000
commitc9ec9e179e5a93a51c1b6e492a4f372662b5d033 (patch)
tree49a12833c4898f8d3a3b0f89e9ff9ed9c9df9a17 /system-linux.c
parent3af40a378ec6c76ddac5ec026d2be1be128dc16c (diff)
downloadnetifd-c9ec9e179e5a93a51c1b6e492a4f372662b5d033.tar.gz
system-linux: free netlink messages after sending
Diffstat (limited to 'system-linux.c')
-rw-r--r--system-linux.c4
1 files changed, 3 insertions, 1 deletions
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)