]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/aacpsy.c
avcodec/alsdec: Check for overread
[ffmpeg] / libavcodec / aacpsy.c
index 0d059373b7fd84a52780b55d53c86b82df7edbfa..3a6615947674229dc5640219ad21d7d4ef956c7c 100644 (file)
@@ -358,7 +358,7 @@ static av_cold int psy_3gpp_init(FFPsyContext *ctx) {
 
     pctx->ch = av_mallocz_array(ctx->avctx->channels, sizeof(AacPsyChannel));
     if (!pctx->ch) {
-        av_freep(&pctx);
+        av_freep(&ctx->model_priv_data);
         return AVERROR(ENOMEM);
     }