af-packet: add sanity check in free function

This should fix a crash I've recently discovered in af-packet running mode. I don't understand why it was working before...