]> git.sesse.net Git - vlc/blobdiff - modules/misc/logger.c
Fix memleak in lua module.
[vlc] / modules / misc / logger.c
index 360a04e2f57ce24fa8184a6d0b09daa02306ad7c..4229fa22d8281b9863a2ba36e4f8d3b944369a93 100644 (file)
@@ -268,6 +268,7 @@ static int Open( vlc_object_t *p_this )
     {
         p_intf->p_sys->p_rrd = utf8_fopen( psz_rrd_file, "w" );
     }
+    free( psz_rrd_file );
 
     p_intf->p_sys->p_sub = msg_Subscribe( p_intf );
     p_intf->pf_run = Run;
@@ -320,7 +321,7 @@ static void Close( vlc_object_t *p_this )
  *****************************************************************************/
 static void Run( intf_thread_t *p_intf )
 {
-    while( !p_intf->b_die )
+    while( vlc_object_alive (p_intf) )
     {
         FlushQueue( p_intf->p_sys->p_sub, p_intf->p_sys->p_file,
                     p_intf->p_sys->i_mode,