mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-16 22:01:15 +08:00
avfilter/drawtext: stop resource leak
Fixes Coverity CID 1445099
This commit is contained in:
@@ -894,7 +894,7 @@ static int command(AVFilterContext *ctx, const char *cmd, const char *arg, char
|
|||||||
|
|
||||||
ctx->priv = old;
|
ctx->priv = old;
|
||||||
uninit(ctx);
|
uninit(ctx);
|
||||||
av_freep(old);
|
av_freep(&old);
|
||||||
|
|
||||||
ctx->priv = new;
|
ctx->priv = new;
|
||||||
return config_input(ctx->inputs[0]);
|
return config_input(ctx->inputs[0]);
|
||||||
@@ -903,7 +903,7 @@ static int command(AVFilterContext *ctx, const char *cmd, const char *arg, char
|
|||||||
|
|
||||||
fail:
|
fail:
|
||||||
av_log(ctx, AV_LOG_ERROR, "Failed to process command. Continuing with existing parameters.\n");
|
av_log(ctx, AV_LOG_ERROR, "Failed to process command. Continuing with existing parameters.\n");
|
||||||
av_freep(new);
|
av_freep(&new);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user