Commit 98dd1b354b for ffmpeg

commit 98dd1b354b434ff137db3b16cddfc03062453fd0
Author: zhang xingxing <2388969553@qq.com>
Date:   Sat Oct 10 08:33:56 2026 +0200

    avformat/file: release the JNI references when fstat() fails in android_content_open()

    This is not a security issue.

    Fixes: yehJZZYu2sOZ
    Fixes: swarm-JNI-resource-leak-on-fstat-failure-in-android_content_open-e505e3
    Found-by: zhang xingxing <2388969553@qq.com>
    Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>

diff --git a/libavformat/file.c b/libavformat/file.c
index 79c6ed88df..31a7f6ac9a 100644
--- a/libavformat/file.c
+++ b/libavformat/file.c
@@ -740,8 +740,9 @@ static int android_content_open(URLContext *h, const char *filename, int flags)
         goto done;

     if (fstat(fd, &st) < 0) {
+        ret = AVERROR(errno);
         close(fd);
-        return AVERROR(errno);
+        goto done;
     }

     c->fd = fd;