media_addon_server: Fix use-after-free on quit.

Putting the add-ons uses the dormant node manager of the BMediaRoster.
The BMediaRoster must therefore only be quit after all add-ons are put.
This commit is contained in:
Michael Lotz 2015-04-04 10:57:50 +02:00
parent d0a9f6803b
commit 2c9e11ba38

View File

@ -335,12 +335,12 @@ MediaAddonServer::QuitRequested()
fSystemTimeSource = NULL;
}
BMediaRoster::CurrentRoster()->Lock();
BMediaRoster::CurrentRoster()->Quit();
for (iterator = fInfoMap.begin(); iterator != fInfoMap.end(); iterator++)
_PutAddonIfPossible(iterator->second);
BMediaRoster::CurrentRoster()->Lock();
BMediaRoster::CurrentRoster()->Quit();
return true;
}