Replace fw3_free_zone() with the generic implementation
[project/firewall3.git] / iptables.c
index cea3fcd..2684933 100644 (file)
@@ -1271,7 +1271,9 @@ free:
 
        xtables_rule_matches_free(&r->matches);
 
 
        xtables_rule_matches_free(&r->matches);
 
-       free(r->target->t);
+       if (r->target)
+               free(r->target->t);
+
        free(r);
 
        /* reset all targets and matches */
        free(r);
 
        /* reset all targets and matches */