xtables: use xtables_rule_matches_free

Thus, we can kill clear_rule_matches. Not required since we are based
upon 1.4.19.1.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
diff --git a/iptables/xtables.c b/iptables/xtables.c
index 946f04d..3e6092f 100644
--- a/iptables/xtables.c
+++ b/iptables/xtables.c
@@ -600,27 +600,6 @@
 	return 1;
 }
 
-static void clear_rule_matches(struct xtables_rule_match **matches)
-{
-	struct xtables_rule_match *matchp, *tmp;
-
-	for (matchp = *matches; matchp;) {
-		tmp = matchp->next;
-		if (matchp->match->m) {
-			free(matchp->match->m);
-			matchp->match->m = NULL;
-		}
-		if (matchp->match == matchp->match->next) {
-			free(matchp->match);
-			matchp->match = NULL;
-		}
-		free(matchp);
-		matchp = tmp;
-	}
-
-	*matches = NULL;
-}
-
 static void command_jump(struct iptables_command_state *cs)
 {
 	size_t size;
@@ -1245,7 +1224,7 @@
 /*	if (verbose > 1)
 		dump_entries(*handle); */
 
-	clear_rule_matches(&cs.matches);
+	xtables_rule_matches_free(&cs.matches);
 
 	if (h->family == AF_INET) {
 		free(args.s.addr.v4);