From f3fe52d1f0003351eb94cf10e0ceb59b768844c0 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 9e284a79..f8929998 100644 --- a/light/Light.cpp +++ b/light/Light.cpp @@ -194,7 +194,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. */