[FFmpeg-devel] [PATCH] overlay: do not leak x/y expressions.
Stefano Sabatini
stefasab at gmail.com
Fri Jan 13 00:34:17 CET 2012
On date Thursday 2012-01-12 19:40:50 +0100, Nicolas George encoded:
>
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
> libavfilter/vf_overlay.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c
> index 062783e..38e8644 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;
> --
> 1.7.7.3
LGTM, thanks.
--
FFmpeg = Fascinating Faithful Multipurpose Power Exploitable Gem
More information about the ffmpeg-devel
mailing list