X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Faacpsy.c;h=482113d42757c56d24b5adcecec4627375dc0db4;hb=420cedd49745b284c35d97b936b71ff79b43bdf7;hp=fca692cb153f17082e3bcb918841b8e2bbbfe2c4;hpb=c6892f59eb0e9f2a9ec1f55b21a5841a60540e1f;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); }