Skip to content
Snippets Groups Projects
Commit e5e20a5e authored by Romain Vimont's avatar Romain Vimont Committed by Hugo Beauzée-Luyssen
Browse files

mtp: remove remaining items on close

Do not leak the remaining items.
parent d1ca62de
No related branches found
No related tags found
1 merge request!945services discovery: mtp: rework implementation
......@@ -190,6 +190,7 @@ static void CloseDevice( services_discovery_t *p_sd )
}
}
free( pp_items );
p_sys->pp_items = NULL;
}
}
......@@ -273,6 +274,15 @@ static void Close( vlc_object_t *p_this )
free( p_sys->psz_name );
vlc_cancel( p_sys->thread );
vlc_join( p_sys->thread, NULL );
if ( p_sys->pp_items != NULL )
{
for( int i_i = 0; i_i < p_sys->i_count; i_i++ )
if( p_sys->pp_items[i_i] != NULL )
input_item_Release( p_sys->pp_items[i_i] );
free( p_sys->pp_items );
}
free( p_sys );
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment