From 9e4356c1f247e6ee784e8e492d9e658817362722 Mon Sep 17 00:00:00 2001 From: chrmhoffmann Date: Sun, 2 Sep 2018 19:55:33 +0200 Subject: [PATCH] sdm660-common: lights: fix an uninitialized local variable dereference * lights hal might crash when call for buttons Change-Id: Iadeb8490642cd7992daaa8b7854cdc1bb64a3de1 --- light/Light.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/light/Light.cpp b/light/Light.cpp index 2eac8c87..c243a130 100644 --- a/light/Light.cpp +++ b/light/Light.cpp @@ -223,7 +223,7 @@ namespace V2_0 { namespace implementation { Return Light::setLight(Type type, const LightState& state) { - LightStateHandler handler; + LightStateHandler handler = nullptr; bool handled = false; /* Lock global mutex until light state is updated. */