Drop unneeded checks before av_free() and change to av_freep() where it's more suitable.