From bddb4413d710531f7e10a1e5bf8a7b0bdd4f811b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Tue, 3 Jun 2008 17:09:13 +0000 Subject: [PATCH] Do not remove the plugin from the list if the ref count has not reached zero, otherwise we leak these plugins, since the ref counting is based on the plugin still being in the list. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25792 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/media/PluginManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kits/media/PluginManager.cpp b/src/kits/media/PluginManager.cpp index 1f19410124..4b483d320a 100644 --- a/src/kits/media/PluginManager.cpp +++ b/src/kits/media/PluginManager.cpp @@ -239,8 +239,8 @@ PluginManager::PutPlugin(MediaPlugin *plugin) if (pinfo->usecount == 0) { delete pinfo->plugin; unload_add_on(pinfo->image); + fPluginList->RemoveCurrent(); } - fPluginList->RemoveCurrent(); fLocker->Unlock(); return; }