[FFmpeg-devel] [PATCH] flacdec: fix memleaks

Nicolas George nicolas.george at normalesup.org
Sun Jul 29 18:37:34 CEST 2012

Le duodi 12 thermidor, an CCXX, Reimar Döffinger a écrit :
>              if (!buffer) {
> -                return AVERROR(ENOMEM);
> +                ret = AVERROR(ENOMEM);
> +                goto err_out;


#define RETURN_ERROR(code) do { ret = (code); goto err_out } while(0)

? If all functions follow the convention of calling the variable with the
return value "ret" and the label for failure "err_out", it can serve for the
whole file. And it will make the code more agreeable to read IMHO.


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120729/31fba344/attachment.asc>

More information about the ffmpeg-devel mailing list