ffmpeg | branch: master | Andreas Rheinhardt <[email protected]> | 
Fri Aug 14 22:06:54 2020 +0200| [dfc6a9f07543e3c2bf01baaf8459558365f961d2] | 
committer: Andreas Rheinhardt

avformat/hls: Fix memleak when url is empty

Fixes Coverity ID 1465888.

Reviewed-by: Steven Liu <[email protected]>
Signed-off-by: Andreas Rheinhardt <[email protected]>

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

 libavformat/hls.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavformat/hls.c b/libavformat/hls.c
index 84f0a5f323..4a3e0d6842 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -311,8 +311,10 @@ static struct playlist *new_playlist(HLSContext *c, const 
char *url,
         return NULL;
     reset_packet(&pls->pkt);
     ff_make_absolute_url(pls->url, sizeof(pls->url), base, url);
-    if (!pls->url[0])
+    if (!pls->url[0]) {
+        av_free(pls);
         return NULL;
+    }
     pls->seek_timestamp = AV_NOPTS_VALUE;
 
     pls->is_id3_timestamped = -1;

_______________________________________________
ffmpeg-cvslog mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to