summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSho Amano <samano@xevo.com>2018-05-07 15:54:51 +0900
committerSho Amano <samano@xevo.com>2018-07-06 12:50:14 +0900
commit2df724177ee1e8b74fce847ca44b5224a756f340 (patch)
tree9018f33ab5bb1eff20733c870039c8872a44e4d5
parent8c589453d331c49607d021d6e40d76b97aa5ff1c (diff)
downloadsdl_core-2df724177ee1e8b74fce847ca44b5224a756f340.tar.gz
fix: invalid memory access in MediaManager when stopping Core
Since ThreadDelegate calls set_delegate() inside its destructor, we need to delete ThreadDelegate first, then Thread. This is detected by valgrind.
-rw-r--r--src/components/media_manager/src/streamer_adapter.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/components/media_manager/src/streamer_adapter.cc b/src/components/media_manager/src/streamer_adapter.cc
index 90a40b1add..37cb1426dc 100644
--- a/src/components/media_manager/src/streamer_adapter.cc
+++ b/src/components/media_manager/src/streamer_adapter.cc
@@ -48,8 +48,8 @@ StreamerAdapter::~StreamerAdapter() {
streamer_->Close();
}
thread_->join();
- threads::DeleteThread(thread_);
delete streamer_;
+ threads::DeleteThread(thread_);
}
void StreamerAdapter::StartActivity(int32_t application_key) {