fixed memory leaks in ipv4, and made icmp copy sometimes