]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/hlsproto.c
avformat/dashdec: Fix memleaks on error to add representation to dynarray
[ffmpeg] / libavformat / hlsproto.c
index e5673e5e03510048ea3aaa6e3440b54fdbbf9ab7..de45f771d660088b9ea67cdb5d926babd69fa693 100644 (file)
@@ -178,7 +178,7 @@ static int hls_close(URLContext *h)
 
     free_segment_list(s);
     free_variant_list(s);
-    ffurl_close(s->seg_hd);
+    ffurl_closep(&s->seg_hd);
     return 0;
 }
 
@@ -260,8 +260,7 @@ start:
             return ret;
     }
     if (s->seg_hd) {
-        ffurl_close(s->seg_hd);
-        s->seg_hd = NULL;
+        ffurl_closep(&s->seg_hd);
         s->cur_seq_no++;
     }
     reload_interval = s->n_segments > 0 ?