summaryrefslogtreecommitdiffstats
path: root/src/rule.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2015-01-11 07:54:55 +0000
committerPatrick McHardy <kaber@trash.net>2015-01-11 07:54:55 +0000
commite89786c29156e851619f9d827944649c82d1792b (patch)
tree6def2be5c4a870c2aa5ee490e9ac396e246f2456 /src/rule.c
parent226b6ab5bd89bd143f5e6c11253c3d98ce5449a3 (diff)
netlink: fix memory leaks
Fix two memory leaks in netlink event monitor. Also fix a leak related to all sets, the ->init expression is not freed. Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'src/rule.c')
-rw-r--r--src/rule.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rule.c b/src/rule.c
index 95766646..dd39e8ae 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -74,6 +74,8 @@ void set_free(struct set *set)
{
if (--set->refcnt > 0)
return;
+ if (set->init != NULL)
+ expr_free(set->init);
handle_free(&set->handle);
xfree(set);
}