break;
}
q = fwrite(buffer, 1, l, f);
if (q != l) {
log_error("Failed to write coredump: %m");
break;
}
q = fwrite(buffer, 1, l, f);
if (q != l) {
log_error("Failed to write coredump: %m");
- char *core_pid = NULL, *core_uid = NULL, *core_gid = NULL, *core_signal = NULL,
+ _cleanup_free_ char *core_pid = NULL, *core_uid = NULL, *core_gid = NULL, *core_signal = NULL,
*core_timestamp = NULL, *core_comm = NULL, *core_exe = NULL, *core_unit = NULL,
*core_timestamp = NULL, *core_comm = NULL, *core_exe = NULL, *core_unit = NULL,
- *core_session = NULL, *core_message = NULL, *core_cmdline = NULL, *t;
+ *core_session = NULL, *core_message = NULL, *core_cmdline = NULL, *t = NULL;
- if (get_process_cmdline(pid, LINE_MAX, false, &t) >= 0) {
+ if (get_process_cmdline(pid, 0, false, &t) >= 0) {