[vlc-commits] lib: media_discoverer: fix media leak
Thomas Guillem
git at videolan.org
Fri Jun 10 14:39:12 CEST 2016
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Jun 10 12:45:44 2016 +0200| [463b4aa9b2888c74d5aac29269fc1e95a8570b2b] | committer: Thomas Guillem
lib: media_discoverer: fix media leak
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=463b4aa9b2888c74d5aac29269fc1e95a8570b2b
---
lib/media_discoverer.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/media_discoverer.c b/lib/media_discoverer.c
index 39ac598..c2a7b02 100644
--- a/lib/media_discoverer.c
+++ b/lib/media_discoverer.c
@@ -119,11 +119,14 @@ static void services_discovery_item_removed( const vlc_event_t * p_event,
for( i = 0; i < count; i++ )
{
p_md = libvlc_media_list_item_at_index( p_mdis->p_mlist, i );
+ assert(p_md != NULL);
if( p_md->p_input_item == p_item )
{
libvlc_media_list_internal_remove_index( p_mdis->p_mlist, i );
+ libvlc_media_release( p_md );
break;
}
+ libvlc_media_release( p_md );
}
libvlc_media_list_unlock( p_mdis->p_mlist );
}
More information about the vlc-commits
mailing list