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:
@@ -335,12 +335,12 @@ MediaAddonServer::QuitRequested()
|
|||||||
fSystemTimeSource = NULL;
|
fSystemTimeSource = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
BMediaRoster::CurrentRoster()->Lock();
|
|
||||||
BMediaRoster::CurrentRoster()->Quit();
|
|
||||||
|
|
||||||
for (iterator = fInfoMap.begin(); iterator != fInfoMap.end(); iterator++)
|
for (iterator = fInfoMap.begin(); iterator != fInfoMap.end(); iterator++)
|
||||||
_PutAddonIfPossible(iterator->second);
|
_PutAddonIfPossible(iterator->second);
|
||||||
|
|
||||||
|
BMediaRoster::CurrentRoster()->Lock();
|
||||||
|
BMediaRoster::CurrentRoster()->Quit();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user