]> git.ipfire.org Git - thirdparty/FORT-validator.git/commitdiff
Fix memory leak
authorpcarana <pc.moreno2099@gmail.com>
Fri, 3 May 2019 21:24:26 +0000 (16:24 -0500)
committerpcarana <pc.moreno2099@gmail.com>
Fri, 3 May 2019 21:24:26 +0000 (16:24 -0500)
src/clients.c

index 955976b73e5cc4b7d1940804425d219d01ac556c..0f6fd0682b0a0127faef48668a4d41e86e81db9d 100644 (file)
@@ -160,8 +160,10 @@ clients_forget(int fd)
        rwlock_write_lock(&lock);
 
        HASH_FIND_INT(table, &fd, client);
-       if (client != NULL)
+       if (client != NULL) {
                HASH_DEL(table, client);
+               free(client);
+       }
 
        rwlock_unlock(&lock);
 }