mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-08 21:54:57 +02:00
pknock: reduce indent in remove_rule
This commit is contained in:
@@ -504,7 +504,9 @@ remove_rule(struct xt_pknock_mtinfo *info)
|
||||
pr_debug("(N) rule not found: %s.\n", info->rule_name);
|
||||
return;
|
||||
}
|
||||
if (rule != NULL && rule->ref_count == 0) {
|
||||
if (rule == NULL || rule->ref_count != 0)
|
||||
return;
|
||||
|
||||
hashtable_for_each_safe(pos, n, rule->peer_head, peer_hashsize, i) {
|
||||
peer = list_entry(pos, struct peer, head);
|
||||
|
||||
@@ -524,7 +526,6 @@ remove_rule(struct xt_pknock_mtinfo *info)
|
||||
list_del(&rule->head);
|
||||
kfree(rule->peer_head);
|
||||
kfree(rule);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user