On Fri, May 27, 2011 at 11:57:50AM -0400, Ronald S. Bultje wrote:
> av_freep(swsContext) will leak all memory potentially
> allocated within the swsContext.
> ---
>  cmdutils.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/cmdutils.c b/cmdutils.c
> index feeea69..778f0fb 100644
> --- a/cmdutils.c
> +++ b/cmdutils.c
> @@ -76,7 +76,8 @@ void uninit_opts(void)
>      av_freep(&avformat_opts->key);
>      av_freep(&avformat_opts);
>  #if CONFIG_SWSCALE
> -    av_freep(&sws_opts);
> +    sws_freeContext(sws_opts);
> +    sws_opts = NULL;
>  #endif
>      for (i = 0; i < opt_name_count; i++) {
>          //opt_values are only stored for codec-specific options in which case
> -- 

ok if valgrind agrees with the change
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to