On Sat, Oct 22, 2011 at 04:10:17PM -0400, Justin Ruggles wrote:
> ---
> libavcodec/tta.c | 6 +++++-
> 1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/libavcodec/tta.c b/libavcodec/tta.c
> index af39c2d..85acc1c 100644
> --- a/libavcodec/tta.c
> +++ b/libavcodec/tta.c
> @@ -259,9 +259,13 @@ static av_cold int tta_decode_init(AVCodecContext *
> avctx)
> }
>
> s->decode_buffer =
> av_mallocz(sizeof(int32_t)*s->frame_length*s->channels);
> + if (!s->decode_buffer)
> + return AVERROR(ENOMEM);
> s->ch_ctx = av_malloc(avctx->channels * sizeof(*s->ch_ctx));
> - if (!s->ch_ctx)
> + if (!s->ch_ctx) {
> + av_freep(&s->decode_buffer);
> return AVERROR(ENOMEM);
> + }
> } else {
> av_log(avctx, AV_LOG_ERROR, "Wrong extradata present\n");
> return -1;
> --
LGTM
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel