pknock: peer can never be NULL in the hash iterator

Given that pos is non-NULL, list_entry won't make it NULL.
This commit is contained in:
Jan Engelhardt
2009-10-07 23:59:41 +02:00
parent 370f47b000
commit f1dc7f960c

View File

@@ -509,13 +509,10 @@ remove_rule(struct xt_pknock_mtinfo *info)
hashtable_for_each_safe(pos, n, rule->peer_head, peer_hashsize, i) {
peer = list_entry(pos, struct peer, head);
if (peer != NULL) {
pk_debug("DELETED", peer);
list_del(pos);
kfree(peer);
}
}
if (rule->status_proc != NULL)
remove_proc_entry(info->rule_name, pde);