avcodec/wavpack: check for allocation failure