]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
IPTV: Fix the remaining memory leaks
authorJaroslav Kysela <perex@perex.cz>
Thu, 22 May 2014 14:03:38 +0000 (16:03 +0200)
committerJaroslav Kysela <perex@perex.cz>
Thu, 22 May 2014 14:03:38 +0000 (16:03 +0200)
src/input/mpegts/iptv/iptv.c
src/input/mpegts/iptv/iptv_mux.c

index 094de3ad8fb674bf3f4bdcbebc85c8513a5f0116..986187bb85d67844814e838f9299a2fc2b132852 100644 (file)
@@ -564,6 +564,7 @@ void iptv_done ( void )
   tvhpoll_destroy(iptv_poll);
   pthread_mutex_lock(&global_lock);
   mpegts_network_unregister_builder(&iptv_network_class);
+  mpegts_network_class_delete(&iptv_network_class, 0);
   mpegts_input_stop_all((mpegts_input_t*)iptv_input);
   mpegts_input_delete((mpegts_input_t *)iptv_input, 0);
   pthread_mutex_unlock(&global_lock);
index 6edda5497bf84585e44803fc660a1795d5b4171e..6732012df8087fff1106cd633983624d5eed0d97 100644 (file)
@@ -74,10 +74,16 @@ iptv_mux_config_save ( mpegts_mux_t *mm )
 static void
 iptv_mux_delete ( mpegts_mux_t *mm, int delconf )
 {
+  iptv_mux_t *im = (iptv_mux_t*)mm;
+
   if (delconf)
     hts_settings_remove("input/iptv/muxes/%s/config",
                       idnode_uuid_as_str(&mm->mm_id));
 
+  free(im->mm_iptv_url);
+  free(im->mm_iptv_interface);
+  free(im->mm_iptv_svcname);
+
   mpegts_mux_delete(mm, delconf);
 }
 
@@ -125,7 +131,7 @@ iptv_mux_create0 ( iptv_network_t *in, const char *uuid, htsmsg_t *conf )
       (void)iptv_service_create0(im, 0, 0, f->hmf_name, e);
     }
   }
-  
+  htsmsg_destroy(c);
 
   return im;
 }