mirror of https://git.ffmpeg.org/ffmpeg.git
Handle malloc failure
Originally committed as revision 9833 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
bffcf2ebbf
commit
6654296c30
|
@ -1047,6 +1047,10 @@ static int atrac3_decode_init(AVCodecContext *avctx)
|
|||
dsputil_init(&dsp, avctx);
|
||||
|
||||
q->pUnits = av_mallocz(sizeof(channel_unit)*q->channels);
|
||||
if (!q->pUnits) {
|
||||
av_free(q->decoded_bytes_buffer);
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue