From 3b36b904d6a4b9bbb7253b9cdbf44b72307d26e1 Mon Sep 17 00:00:00 2001 From: George Burgess IV Date: Wed, 2 Oct 2019 11:22:55 -0700 Subject: [PATCH] lmkd: fix an uninit value bug Caught by clang's static analyzer: system/core/lmkd/lmkd.c:930:9: warning: 1st function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage] Bug: None Test: TreeHugger Change-Id: I9dc8e97d6aa22ea977fa06553d957a31a9df8819 --- lmkd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lmkd.c b/lmkd.c index e3f2bc2..372e10f 100644 --- a/lmkd.c +++ b/lmkd.c @@ -926,12 +926,12 @@ static void cmd_procprio(LMKD_CTRL_PACKET packet) { static void cmd_procremove(LMKD_CTRL_PACKET packet) { struct lmk_procremove params; + lmkd_pack_get_procremove(packet, ¶ms); if (use_inkernel_interface) { stats_remove_taskname(params.pid, kpoll_info.poll_fd); return; } - lmkd_pack_get_procremove(packet, ¶ms); /* * WARNING: After pid_remove() procp is freed and can't be used! * Therefore placed at the end of the function.