[FFmpeg-devel] [PATCH 3/3] nutdec: fix memleaks on error in nut_read_header

Michael Niedermayer michaelni at gmx.at
Tue Apr 28 22:55:45 CEST 2015


On Tue, Apr 28, 2015 at 08:58:21PM +0200, Andreas Cadhalpun wrote:
> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
[...]
> @@ -806,7 +811,10 @@ static int nut_read_header(AVFormatContext *s)
>  
>      ff_metadata_conv_ctx(s, NULL, ff_nut_metadata_conv);
>  
> -    return 0;
> +end:
> +    if (ret < 0)
> +        nut_read_close(s);

> +    return FFMIN(ret, 0);

btw, the FFMIN could be removed unless iam missing something
not really important though

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many things microsoft did are stupid, but not doing something just because
microsoft did it is even more stupid. If everything ms did were stupid they
would be bankrupt already.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150428/e94f5267/attachment.asc>


More information about the ffmpeg-devel mailing list