On Mon, Nov 17, 2014 at 12:22 AM, Vittorio Giovara
<[email protected]> wrote:
> CC: [email protected]
> Bug-Id: CID 1250334
> ---
>  libavfilter/formats.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/libavfilter/formats.c b/libavfilter/formats.c
> index 24a4fab..ea61ed2 100644
> --- a/libavfilter/formats.c
> +++ b/libavfilter/formats.c
> @@ -188,8 +188,10 @@ do {                                                     
>    \
>                                                              \
>      fmts = av_realloc((*f)->list,                           \
>                        sizeof(*(*f)->list) * ((*f)->nb + 1));\
> -    if (!fmts)                                              \
> +    if (!fmts) {                                            \
> +        av_freep(&f);                                       \
>          return AVERROR(ENOMEM);                             \
> +    }                                                       \
>                                                              \
>      (*f)->list = fmts;                                      \
>      (*f)->list[(*f)->nb++] = fmt;                           \
> --
> 1.9.3 (Apple Git-50)
>

ping

-- 
Vittorio
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to