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
This commit is contained in:
George Burgess IV 2019-10-02 11:22:55 -07:00 committed by Suren Baghdasaryan
parent 3f5cb4c0d8
commit 3b36b904d6
1 changed files with 1 additions and 1 deletions

2
lmkd.c
View File

@ -926,12 +926,12 @@ static void cmd_procprio(LMKD_CTRL_PACKET packet) {
static void cmd_procremove(LMKD_CTRL_PACKET packet) { static void cmd_procremove(LMKD_CTRL_PACKET packet) {
struct lmk_procremove params; struct lmk_procremove params;
lmkd_pack_get_procremove(packet, &params);
if (use_inkernel_interface) { if (use_inkernel_interface) {
stats_remove_taskname(params.pid, kpoll_info.poll_fd); stats_remove_taskname(params.pid, kpoll_info.poll_fd);
return; return;
} }
lmkd_pack_get_procremove(packet, &params);
/* /*
* WARNING: After pid_remove() procp is freed and can't be used! * WARNING: After pid_remove() procp is freed and can't be used!
* Therefore placed at the end of the function. * Therefore placed at the end of the function.