From 4fdc670c7f734529042e6940bffca09799728fec Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Sun, 11 Dec 2016 15:12:18 +1000 Subject: [PATCH] fix for ip guard --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 83e937a..a864b61 100644 --- a/main.c +++ b/main.c @@ -966,7 +966,7 @@ void server(int port) { ip_guard->status = IP_STATUS_UNKNOWN; ip_guard->last_connection = time(NULL); ip_guard->connection_count = 1; - hashmap_put(ip_guard_map, ip, ip_guard); + hashmap_put(ip_guard_map, strdup(ip), ip_guard); } else if (i == MAP_OK) { if (ip_guard->status == IP_STATUS_BLACKLISTED) {