avcodec/snow: check for malloc* failures