aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-01-12 19:18:13 +0100
committerNicolas George <nicolas.george@normalesup.org>2012-01-15 09:12:03 +0100
commitbbf372e1457a1cde5de8df8bdf930560bc9c9631 (patch)
tree564257ea4251c90067e5ee02e3ab9cf288a3de2a
parent668a74e808dad06b15549ed05aa3a879f76c17c3 (diff)
downloadffmpeg-bbf372e1457a1cde5de8df8bdf930560bc9c9631.tar.gz
overlay: do not leak x/y expressions.
-rw-r--r--libavfilter/vf_overlay.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c
index 062783ea56..38e8644f61 100644
--- a/libavfilter/vf_overlay.c
+++ b/libavfilter/vf_overlay.c
@@ -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;