Fixed memory leaking when excluding one or multiple IPs.