From e7a65142b972fc1f7fd020d89c8f82dc3cfbc553 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Mon, 1 Jun 2015 01:32:24 +0200
Subject: [PATCH] avcodec/aacpsy: Clear the correct pointer

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
---
 libavcodec/aacpsy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/aacpsy.c b/libavcodec/aacpsy.c
index 0d059373b7f..3a661594767 100644
--- a/libavcodec/aacpsy.c
+++ b/libavcodec/aacpsy.c
@@ -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);
     }
 
-- 
GitLab