]> git.sesse.net Git - ffmpeg/commitdiff
overlay: do not leak x/y expressions.
authorNicolas George <nicolas.george@normalesup.org>
Thu, 12 Jan 2012 18:18:13 +0000 (19:18 +0100)
committerNicolas George <nicolas.george@normalesup.org>
Sun, 15 Jan 2012 08:12:03 +0000 (09:12 +0100)
libavfilter/vf_overlay.c

index 062783ea560b41d33a45dd1a328f31cc58dab8c6..38e8644f61d3d402f62d7c95fc6550a458b3846b 100644 (file)
@@ -115,12 +115,14 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
     av_opt_set_defaults(over);
 
     if (expr = av_strtok(args1, ":", &bufptr)) {
+        av_free(over->x_expr);
         if (!(over->x_expr = av_strdup(expr))) {
             ret = AVERROR(ENOMEM);
             goto end;
         }
     }
     if (expr = av_strtok(NULL, ":", &bufptr)) {
+        av_free(over->y_expr);
         if (!(over->y_expr = av_strdup(expr))) {
             ret = AVERROR(ENOMEM);
             goto end;