_I("Released crashed process lock");
}
-static bool run(struct crash_info *cinfo)
+static void run(struct crash_info *cinfo)
{
/* Special PID ( <= 0) for which the report will contain only
* dump_systemstate output
kill_pid(cinfo->pid_info, SIGKILL, false);
}
}
-
- return true;
}
static bool crash_manager_prepare(struct crash_info *cinfo)
if (!crash_manager_prepare(cinfo))
return false;
- bool result = run(cinfo);
+ run(cinfo);
crash_manager_cleanup(cinfo);
- return result;
+ return true;
}
EXPORT bool crash_manager_livedump_pid(pid_t pid, const char *dump_reason, char *report_path, size_t report_path_len)
write_dump_reason(dump_reason, cinfo.pfx, cinfo.name);
- result = run(&cinfo);
+ run(&cinfo);
crash_manager_cleanup(&cinfo);
- if (!result)
- goto exit;
-
strncpy(report_path, cinfo.result_path, report_path_len);
result = true;
static int mem_region_init_vdso(struct mem_region *region)
{
region->data_head = malloc(sizeof(struct mem_data_chunk));
+ if (region->data_head == NULL) {
+ _E("Memory allocation error");
+ return -1;
+ }
mem_data_chunk_init(region->data_head);
region->data_head->start = region->start;
region->data_head->length = region->length;