avformat/avidec: use av_calloc() and check for allocation error

Signed-off-by: Paul B Mahol <onemda@gmail.com>
swresample: replace 2 av_free() by av_freep()

avoids leaving stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
swscale/yuv2rgb: make sure yuvTable is set to NULL after deallocation

ensures no stale pointers remain

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
lavf/avienc: use av_freep() avoid stale pointers

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>