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

Commit 201734e5 authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk
Browse files

Fix sp<> crash on stack-allocated service object.

Bug: 145609858
Test: build, boot
Change-Id: Ia705750c77ee8ba950d19eae9bbd208b0dac2310
parent 66135e54
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -32,8 +32,8 @@ static void canControllerService() {
    configureRpcThreadpool(16, true);
    LOG(DEBUG) << "CAN controller service starting...";

    CanController canController;
    if (canController.registerAsService("socketcan") != OK) {
    sp<CanController> canController(new CanController);
    if (canController->registerAsService("socketcan") != OK) {
        LOG(FATAL) << "Failed to register CAN controller";
        return;
    }