1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

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>
This commit is contained in:
Limin Wang 2019-09-20 19:17:28 +08:00 committed by Michael Niedermayer
parent 648b8cca6c
commit f9d6addd60

View File

@ -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)) {