[vlc-commits] qt4: selector: Fix leak on unhandled command
Hugo Beauzée-Luyssen
git at videolan.org
Thu Dec 10 18:24:35 CET 2015
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Dec 10 18:05:25 2015 +0100| [8f629e451edd58e1ca087f33c7d73a8e8a3221d1] | committer: Hugo Beauzée-Luyssen
qt4: selector: Fix leak on unhandled command
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8f629e451edd58e1ca087f33c7d73a8e8a3221d1
---
modules/gui/qt4/components/playlist/selector.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/gui/qt4/components/playlist/selector.cpp b/modules/gui/qt4/components/playlist/selector.cpp
index 41ad88d..3efc872 100644
--- a/modules/gui/qt4/components/playlist/selector.cpp
+++ b/modules/gui/qt4/components/playlist/selector.cpp
@@ -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 );
}
}
More information about the vlc-commits
mailing list