pknock: reduce indent in remove_rule

This commit is contained in:
Jan Engelhardt
2009-10-07 23:59:05 +02:00
parent 8e812620f0
commit 370f47b000

View File

@@ -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);
@@ -525,7 +527,6 @@ remove_rule(struct xt_pknock_mtinfo *info)
kfree(rule->peer_head);
kfree(rule);
}
}
/**
* If peer status exist in the list it returns peer status, if not it returns NULL.