]> git.sesse.net Git - vlc/commitdiff
messages.c: fixed one more leak related to vlm prefix on messages.
authorSigmund Augdal Helberg <sigmunau@videolan.org>
Mon, 30 Jan 2006 11:13:11 +0000 (11:13 +0000)
committerSigmund Augdal Helberg <sigmunau@videolan.org>
Mon, 30 Jan 2006 11:13:11 +0000 (11:13 +0000)
This one happened each time the message queue was overflowed.
Also (hopefully) fixed a leak that would happen each time no message
queue were found. I don't know if this condition can ever appear though

src/misc/messages.c

index e9e3bba10b6bd56e20dc06a7b9e1c93339a59d24..2f2fcd0b88a094cdb27be0974d2d5d59a397f485 100644 (file)
@@ -383,6 +383,8 @@ static void QueueMsg( vlc_object_t *p_this, int i_queue_id, int i_type,
     if( p_queue == NULL )
     {
         vlc_mutex_unlock( &p_bank->lock );
+        if( psz_str ) free( psz_str );
+        if( psz_header ) free( psz_header );
         return;
     }
 
@@ -456,6 +458,8 @@ static void QueueMsg( vlc_object_t *p_this, int i_queue_id, int i_type,
             free( p_item->psz_module );
         if( p_item->psz_msg )
             free( p_item->psz_msg );
+        if( p_item->psz_header )
+            free( p_item->psz_header );
     }
 
     vlc_mutex_unlock ( &p_queue->lock );