avfilter/drawtext: stop resource leak
authorGyan Doshi <ffmpeg@gyani.pro>
Wed, 15 May 2019 07:06:05 +0000 (12:36 +0530)
committerGyan Doshi <ffmpeg@gyani.pro>
Thu, 16 May 2019 05:00:28 +0000 (10:30 +0530)
Fixes Coverity CID 1445099

libavfilter/vf_drawtext.c

index b166574..01cd7fa 100644 (file)
@@ -894,7 +894,7 @@ static int command(AVFilterContext *ctx, const char *cmd, const char *arg, char
 
         ctx->priv = old;
         uninit(ctx);
-        av_freep(old);
+        av_freep(&old);
 
         ctx->priv = new;
         return config_input(ctx->inputs[0]);
@@ -903,7 +903,7 @@ static int command(AVFilterContext *ctx, const char *cmd, const char *arg, char
 
 fail:
     av_log(ctx, AV_LOG_ERROR, "Failed to process command. Continuing with existing parameters.\n");
-    av_freep(new);
+    av_freep(&new);
     return ret;
 }