drawtext: fix leak with timecodes
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 11 Oct 2012 14:45:50 +0000 (16:45 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 11 Oct 2012 14:45:50 +0000 (16:45 +0200)
Fixes CID733799
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/vf_drawtext.c

index 9b7f8ee..7b67271 100644 (file)
@@ -665,6 +665,7 @@ static int draw_text(AVFilterContext *ctx, AVFilterBufferRef *picref,
     if (dtext->tc_opt_string) {
         char tcbuf[AV_TIMECODE_STR_SIZE];
         av_timecode_make_string(&dtext->tc, tcbuf, dtext->frame_id++);
+        av_free(buf);
         buf = av_asprintf("%s%s", dtext->text, tcbuf);
     }