summaryrefslogtreecommitdiffstats
path: root/ip6tables.c
diff options
context:
space:
mode:
Diffstat (limited to 'ip6tables.c')
-rw-r--r--ip6tables.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ip6tables.c b/ip6tables.c
index 6afe68f..e2c514e 100644
--- a/ip6tables.c
+++ b/ip6tables.c
@@ -1691,8 +1691,10 @@ void clear_rule_matches(struct ip6tables_rule_match **matches)
for (matchp = *matches; matchp;) {
tmp = matchp->next;
- if (matchp->match->m)
+ if (matchp->match->m) {
free(matchp->match->m);
+ matchp->match->m = NULL;
+ }
free(matchp);
matchp = tmp;
}