gods

a simple blocklist for ssh
Log | Files | Refs | README | LICENSE

commit bfcda0f985e147f8330f55071ccfb282cb31997d
parent 52eded74638fba142ceddcdc5e3b9ee25a5a4cbf
Author: Naveen Narayanan <zerous@nocebo.space>
Date:   Tue, 12 Oct 2021 02:23:04 +0200

Implement cleanup()

Diffstat:
Mmain.c | 15+++++++++++++++
1 file changed, 15 insertions(+), 0 deletions(-)

diff --git a/main.c b/main.c @@ -117,6 +117,20 @@ foverlap(int fd1, int fd2) return 0; } +void +cleanup() +{ + struct attacker *prev, *a; + + prev= NULL; + SLIST_FOREACH(a, &head, attackers) { + if (prev) + free(prev); + prev = a; + } + free(prev); +} + int main(int argc, char **argv) { @@ -224,5 +238,6 @@ main(int argc, char **argv) unban(NULL, &head); } + cleanup(); return 0; }