mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-06 12:45:13 +02:00
pknock: fix PVSStudio static analyzer reports
V595 The 'peer' pointer was utilized before it was verified against nullptr.
This commit is contained in:
@@ -619,8 +619,9 @@ static void add_peer(struct peer *peer, struct xt_pknock_rule *rule)
|
||||
*/
|
||||
static void remove_peer(struct peer *peer)
|
||||
{
|
||||
if (peer == NULL)
|
||||
return;
|
||||
list_del(&peer->head);
|
||||
if (peer != NULL)
|
||||
kfree(peer);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user