Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1d237b5b authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "storaged:Thread out of sync will cause null pointer crash" am:...

Merge "storaged:Thread out of sync will cause null pointer crash" am: 2929ab63 am: 38669ed4 am: eda17739

Change-Id: If695fe32c32fb597286c7de710a030259743ba17
parents 0a65df13 eda17739
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -46,11 +46,6 @@ sp<storaged_t> storaged_sp;

// Function of storaged's main thread
void* storaged_main(void* /* unused */) {
    storaged_sp = new storaged_t();

    storaged_sp->init();
    storaged_sp->report_storage_info();

    LOG(INFO) << "storaged: Start";

    for (;;) {
@@ -123,6 +118,9 @@ int main(int argc, char** argv) {

    if (flag_main_service) { // start main thread
        // Start the main thread of storaged
        storaged_sp = new storaged_t();
        storaged_sp->init();
        storaged_sp->report_storage_info();
        pthread_t storaged_main_thread;
        errno = pthread_create(&storaged_main_thread, NULL, storaged_main, NULL);
        if (errno != 0) {