From 10a75706de69f660ac3b4148bc65e123c5b26790 Mon Sep 17 00:00:00 2001 From: Rajeev Kumar Date: Wed, 21 Feb 2018 19:08:15 -0800 Subject: [PATCH] Fix variable name in log statement and initialize memory_stat before using it. Bug: 72177881 Test: Tested manually Change-Id: Icbf948dd0e40eaa6c660d55f5cd72182436da086 --- lmkd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lmkd.c b/lmkd.c index 74454de..3545400 100644 --- a/lmkd.c +++ b/lmkd.c @@ -605,7 +605,7 @@ static int memory_stat_parse(struct memory_stat *mem_st, int pid, uid_t uid) { fp = fopen(buf, "r"); if (fp == NULL) { - ALOGE("%s open failed: %s", path, strerror(errno)); + ALOGE("%s open failed: %s", buf, strerror(errno)); return -1; } @@ -715,7 +715,7 @@ static int kill_one_process(struct proc* procp, int min_score_adj, int r; #ifdef LMKD_LOG_STATS - struct memory_stat mem_st; + struct memory_stat mem_st = {}; int memory_stat_parse_result = -1; #endif