]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Fix memory leak in iptv.c master
authorFlole <Flole998@users.noreply.github.com>
Sat, 9 Aug 2025 17:28:21 +0000 (19:28 +0200)
committerFlole <Flole998@users.noreply.github.com>
Sun, 10 Aug 2025 11:31:20 +0000 (13:31 +0200)
src/input/mpegts/iptv/iptv.c

index b1efb0b21561abe31b33243928f858605ace17a1..17d2c2701638ccc58dfd524b15ffefa4a3dd77ea 100644 (file)
@@ -384,6 +384,7 @@ iptv_input_start_mux ( mpegts_input_t *mi, mpegts_mux_instance_t *mmi, int weigh
 
     if (urlparse(raw ?: "", &url)) {
       tvherror(LS_IPTV, "%s - invalid URL [%s]", im->mm_nicename, raw);
+      urlreset(&url);
       return ret;
     }
     scheme = url.scheme;
@@ -394,6 +395,7 @@ iptv_input_start_mux ( mpegts_input_t *mi, mpegts_mux_instance_t *mmi, int weigh
   ih = iptv_handler_find(scheme ?: "");
   if (!ih) {
     tvherror(LS_IPTV, "%s - unsupported scheme [%s]", im->mm_nicename, scheme ?: "none");
+    urlreset(&url);
     return ret;
   }