mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
Fix sp<> crash on stack-allocated service object.
Bug: 145609858 Test: build, boot Change-Id: Ia705750c77ee8ba950d19eae9bbd208b0dac2310
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user