mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/aacpsy: Check model_priv_data before dereferencing in psy_3gpp_end()
Fixes: null pointer dereference Fixes: av_freep.mp4 Found-by: Rafael Dutra <rafael.dutra@cispa.de> Tested-by: Rafael Dutra <rafael.dutra@cispa.de> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
5c2ff44f91
commit
28859d6e7c
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user