[FFmpeg-devel] [PATCH] Check malloc values in swscale.
Kostya
kostya.shishkov
Fri Aug 14 06:45:52 CEST 2009
On Thu, Aug 13, 2009 at 10:11:45PM -0300, Ramiro Polla wrote:
> Hi,
>
> $subj
>
> Am I being overparanoid cleaning up all previously allocated blocks
> before leaving the function, like in:
> for (i=0; i<c->vLumBufSize; i++)
> + {
> c->alpPixBuf[i]= c->alpPixBuf[i+c->vLumBufSize]= av_mallocz(VOF+1);
> + if (!c->alpPixBuf[i]) {
> + for (; i >= 0; i--)
> + av_free(c->alpPixBuf[i]);
> + return NULL;
> + }
> + }
Diego will kill you for such opening brace placement.
> Is ok to just return NULL and leave those previous blocks there?
>
> Ramiro Polla
More information about the ffmpeg-devel
mailing list