Commit d2858830 authored by Clément Stenac's avatar Clément Stenac

Memleak

parent 058456af
...@@ -133,7 +133,7 @@ void __msg_Flush( vlc_object_t *p_this ) ...@@ -133,7 +133,7 @@ void __msg_Flush( vlc_object_t *p_this )
void __msg_Destroy( vlc_object_t *p_this ) void __msg_Destroy( vlc_object_t *p_this )
{ {
int i; int i;
for( i = 0 ; i < p_this->p_libvlc->msg_bank.i_queues; i++ ) for( i = p_this->p_libvlc->msg_bank.i_queues -1 ; i >= 0; i-- )
{ {
msg_queue_t *p_queue = p_this->p_libvlc->msg_bank.pp_queues[i]; msg_queue_t *p_queue = p_this->p_libvlc->msg_bank.pp_queues[i];
if( p_queue->i_sub ) if( p_queue->i_sub )
...@@ -148,6 +148,9 @@ void __msg_Destroy( vlc_object_t *p_this ) ...@@ -148,6 +148,9 @@ void __msg_Destroy( vlc_object_t *p_this )
#endif #endif
/* Destroy lock */ /* Destroy lock */
vlc_mutex_destroy( &p_queue->lock ); vlc_mutex_destroy( &p_queue->lock );
REMOVE_ELEM( p_this->p_libvlc->msg_bank.pp_queues,
p_this->p_libvlc->msg_bank.i_queues, i );
free( p_queue );
} }
vlc_mutex_destroy( &(p_this->p_libvlc->msg_bank.lock) ); vlc_mutex_destroy( &(p_this->p_libvlc->msg_bank.lock) );
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment