diff options
author | Limin Wang <lance.lmwang@gmail.com> | 2019-09-20 19:17:28 +0800 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-12-06 11:25:29 +0100 |
commit | f9d6addd60b3f9ac87388fe4ae0dc217235af81d (patch) | |
tree | 5ef6bc127f44f5d6c039847959c081e6422f21e3 /libavformat/libsrt.c | |
parent | 648b8cca6c56a4fa1760efc72dfe1363a5c6e31e (diff) | |
download | ffmpeg-f9d6addd60b3f9ac87388fe4ae0dc217235af81d.tar.gz |
avformat/libsrt: fix for the memory leak if passphrase has been configured by option
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/libsrt.c')
-rw-r--r-- | libavformat/libsrt.c | 1 |
1 files changed, 1 insertions, 0 deletions
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)) { |