X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Faacpsy.c;h=482113d42757c56d24b5adcecec4627375dc0db4;hb=90262f3fb4afe4b903888e45cc40e2116cb69683;hp=fca692cb153f17082e3bcb918841b8e2bbbfe2c4;hpb=0dda0f3bdb7e8a2d5bef7457375f72f38a100ccb;p=ffmpeg diff --git a/libavcodec/aacpsy.c b/libavcodec/aacpsy.c index fca692cb153..482113d4275 100644 --- a/libavcodec/aacpsy.c +++ b/libavcodec/aacpsy.c @@ -855,7 +855,8 @@ static void psy_3gpp_analyze(FFPsyContext *ctx, int channel, static av_cold void psy_3gpp_end(FFPsyContext *apc) { AacPsyContext *pctx = (AacPsyContext*) apc->model_priv_data; - av_freep(&pctx->ch); + if (pctx) + av_freep(&pctx->ch); av_freep(&apc->model_priv_data); }