mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-06 04:35:12 +02:00
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:
@@ -509,12 +509,9 @@ 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);
|
||||
}
|
||||
pk_debug("DELETED", peer);
|
||||
list_del(pos);
|
||||
kfree(peer);
|
||||
}
|
||||
|
||||
if (rule->status_proc != NULL)
|
||||
|
Reference in New Issue
Block a user