This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch release/9.1
in repository ffmpeg.

commit 837fcc00eb3842cbe5e22cdebcd82fe52f1f0816
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Sat Oct 31 05:18:14 2026 +0100
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Sun Nov 15 02:45:16 2026 +0100

    avcodec/psd: free the RLE buffer when the frame allocation fails
    
    This is not a security issue: the leak needs the frame allocation to
    fail.
    
    Fixes: memleak
    Fixes: 9UXawhjlJguX
    Fixes: AISLE-2026-0150-00349
    Memory leak Replicated through API with LSAN
    
    Found-by: Joshua Rogers (AISLE)
    (cherry picked from commit ad7ce15a51c7a8bac74075bd93618ae6ccab74b5)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/psd.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/psd.c b/libavcodec/psd.c
index f4973ecb7e..0bf3868e9c 100644
--- a/libavcodec/psd.c
+++ b/libavcodec/psd.c
@@ -469,8 +469,10 @@ static int decode_frame(AVCodecContext *avctx, AVFrame 
*picture,
         ptr_data = s->gb.buffer;
     }
 
-    if ((ret = ff_get_buffer(avctx, picture, 0)) < 0)
+    if ((ret = ff_get_buffer(avctx, picture, 0)) < 0) {
+        av_freep(&s->tmp);
         return ret;
+    }
 
     /* Store data */
     if ((avctx->pix_fmt == AV_PIX_FMT_YA8)||(avctx->pix_fmt == 
AV_PIX_FMT_YA16BE)){/* Interleaved */

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to