[MPlayer-dev-eng] [Patch] vf_scale.c memleak
Michael Niedermayer
michaelni at gmx.at
Mon Nov 1 02:18:08 CET 2004
Hi
On Monday 01 November 2004 01:26, Wei Jiang wrote:
> The local pointer need to be freed befroe the function exits, there is no
> other pointer store those allocated memory pointers.
static SwsFilter *src_filter= NULL;
>
> diff -u -r1.55 vf_scale.c
> --- libmpcodecs/vf_scale.c 18 Sep 2004 00:08:16 -0000 1.55
> +++ libmpcodecs/vf_scale.c 1 Nov 2004 00:23:28 -0000
> @@ -198,6 +198,9 @@
> best,
> int_sws_flags | get_sws_cpuflags(), srcFilter, dstFilter,
> vf->priv->param); }
> + if (srcFilter) sws_freeFilter(srcFilter);
> + if (dstFilter) sws_freeFilter(dstFilter);
> + srcFilter=dstFilter=NULL;
rejected
[...]
--
Michael
"I do not agree with what you have to say, but I'll defend to the death your
right to say it." -- Voltaire
More information about the MPlayer-dev-eng
mailing list