comparison plugin/FeatureExtractionPluginFactory.cpp @ 973:7aa9088e9bcd

Fix various slightly dodgy derefs and the like (from coverity scan)
author Chris Cannam
date Wed, 03 Sep 2014 11:20:18 +0100
parents f5cd33909744
children a1cd5abcb38b
comparison
equal deleted inserted replaced
972:a0573186435e 973:7aa9088e9bcd
46 { 46 {
47 // see notes in vamp-sdk/hostext/PluginLoader.cpp from which this is drawn 47 // see notes in vamp-sdk/hostext/PluginLoader.cpp from which this is drawn
48 Vamp::Plugin *p = m_plugin; 48 Vamp::Plugin *p = m_plugin;
49 delete m_plugin; 49 delete m_plugin;
50 m_plugin = 0; 50 m_plugin = 0;
51 // acceptable use after free here, as pluginDeleted uses p only as
52 // pointer key and does not deref it
51 if (m_factory) m_factory->pluginDeleted(p); 53 if (m_factory) m_factory->pluginDeleted(p);
52 } 54 }
53 55
54 static FeatureExtractionPluginFactory *_nativeInstance = 0; 56 static FeatureExtractionPluginFactory *_nativeInstance = 0;
55 57