]> git.ipfire.org Git - thirdparty/suricata.git/commit
iprep: unify free handling
authorVictor Julien <vjulien@oisf.net>
Wed, 23 Feb 2022 10:05:40 +0000 (11:05 +0100)
committerVictor Julien <vjulien@oisf.net>
Thu, 24 Feb 2022 17:23:30 +0000 (18:23 +0100)
commit172d2b28a58d923ddbc5644dd3bfb52e353b8a55
treeeae88134e6545cbf4f793bddaf79e2e73bfd8206
parenta6a6f6d538c72cc5866fae6ea301b54cbc969a62
iprep: unify free handling

Introduce a new util function to free a Hosts iprep code. It also
handles the Host use_cnt decrement.

This change makes sure we also decrement the use_cnt when cleaning
up when shutting down the host table.

Move the BUG_ON check for use_cnt into the HostClearMemory() func
to check it in more cases.
src/host.c
src/reputation.c
src/reputation.h