[FFmpeg-devel] [PATCHv+ BUG REPORT] Various memory leaks
Fri Feb 19 19:25:53 CET 2010
On Fri, Feb 19, 2010 at 06:18:47PM +0100, Vitor Sessak wrote:
> - if (av_new_packet(pkt, 4 + pkt_size))
> - return AVERROR(ENOMEM);
> + if ((ret = av_new_packet(pkt, 4 + pkt_size)))
> + return ret;
Should check for < 0 only, not != 0.
Also I'd be in favour of doing the assignment outside the if.
The rest seems fine to me, though a bit inconsistent with sometimes
an empty line between assignment and if and sometimes without.
More information about the ffmpeg-devel