[FFmpeg-cvslog] avformat/libsrt: fix for the memory leak if passphrase has been configured by option

Limin Wang git at videolan.org
Fri Dec 6 12:32:50 EET 2019


ffmpeg | branch: master | Limin Wang <lance.lmwang at gmail.com> | Fri Sep 20 19:17:28 2019 +0800| [f9d6addd60b3f9ac87388fe4ae0dc217235af81d] | committer: Michael Niedermayer

avformat/libsrt: fix for the memory leak if passphrase has been configured by option

Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f9d6addd60b3f9ac87388fe4ae0dc217235af81d
---

 libavformat/libsrt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c
index 1c34ec50b2..fd27e36b08 100644
--- a/libavformat/libsrt.c
+++ b/libavformat/libsrt.c
@@ -494,6 +494,7 @@ static int libsrt_open(URLContext *h, const char *uri, int flags)
             s->pbkeylen = strtol(buf, NULL, 10);
         }
         if (av_find_info_tag(buf, sizeof(buf), "passphrase", p)) {
+            av_freep(&s->passphrase);
             s->passphrase = av_strndup(buf, strlen(buf));
         }
         if (av_find_info_tag(buf, sizeof(buf), "mss", p)) {



More information about the ffmpeg-cvslog mailing list