net: netem: fix use after free and double free with packet corruption