Commit 8f629e45 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

qt4: selector: Fix leak on unhandled command

parent 4f412dbc
......@@ -367,7 +367,9 @@ void PLSelector::setSource( QTreeWidgetItem *item )
services_discovery_descriptor_t *p_test = new services_discovery_descriptor_t;
int i_ret = playlist_ServicesDiscoveryControl( THEPL, qtu( qs ), SD_CMD_DESCRIPTOR, p_test );
if( i_ret == VLC_SUCCESS && p_test->i_capabilities & SD_CAP_SEARCH )
if ( i_ret != VLC_SUCCESS )
delete p_test;
else if ( p_test->i_capabilities & SD_CAP_SEARCH )
item->setData( 0, CAP_SEARCH_ROLE, true );
}
}
......
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