On 10/21/2011 08:36 PM, Luca Barbato wrote: > On 10/21/11 2:58 PM, Justin Ruggles wrote: >> --- >> libavcodec/tta.c | 2 ++ >> 1 files changed, 2 insertions(+), 0 deletions(-) >> >> diff --git a/libavcodec/tta.c b/libavcodec/tta.c >> index af39c2d..534eb1f 100644 >> --- a/libavcodec/tta.c >> +++ b/libavcodec/tta.c >> @@ -259,6 +259,8 @@ 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) >> return AVERROR(ENOMEM); > > so if the first succeeds and the second fails we leak
oops, that was careless. i'll redo the patch. thanks, justin _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
