[FFmpeg-devel] [PATCH V2] avutil/tx: add check against (*ctx)
Lynne
dev at lynne.ee
Thu May 16 13:34:29 EEST 2019
May 16, 2019, 6:02 AM by ruiling.song at intel.com:
> ctx is a pointer to pointer here.
>
> Signed-off-by: Ruiling Song <> ruiling.song at intel.com <mailto:ruiling.song at intel.com>> >
> ---
> libavutil/tx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavutil/tx.c b/libavutil/tx.c
> index 934ef27c81..1690604040 100644
> --- a/libavutil/tx.c
> +++ b/libavutil/tx.c
> @@ -697,7 +697,7 @@ static int gen_mdct_exptab(AVTXContext *s, int len4, double scale)
>
> av_cold void av_tx_uninit(AVTXContext **ctx)
> {
> - if (!ctx)
> + if (!ctx || !(*ctx))
> return;
>
> av_free((*ctx)->pfatab);
>
LGTM
More information about the ffmpeg-devel
mailing list