When calling __remove_proc_info(), the allocated memory is released.
Before calling __remove_proc_info(), AMD sets the cmd variable to avoid
invalid access.
Change-Id: I16aa97d80b8cd63440033fa1d5137c4a9b5d5c65
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
pid_t pid = GPOINTER_TO_INT(data);
app_status_h app_status;
proc_info_t *ctx;
+ int cmd;
ctx = __find_proc_info(pid);
if (!ctx)
return G_SOURCE_REMOVE;
ctx->timer = 0;
+ cmd = ctx->cmd;
__remove_proc_info(pid);
app_status = _app_status_find_v2(pid);
return G_SOURCE_REMOVE;
}
- _W("Application(%d) Not Responding. cmd(%d)", pid, ctx->cmd);
+ _W("Application(%d) Not Responding. cmd(%d)", pid, cmd);
if (__can_ignore_anr_policy(app_status)) {
_W("Ignore ANR policy. pid(%d)", pid);
return G_SOURCE_REMOVE;