1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-03-08 20:58:20 +03:00

coredump: always log on failure in parse_core()

This commit is contained in:
Luca Boccassi 2021-11-24 20:13:44 +00:00
parent f0e2377a68
commit f05b5cddfb

View File

@ -367,12 +367,12 @@ static int parse_core(int fd, const char *executable, char **ret, JsonVariant **
assert(fd >= 0);
if (lseek(fd, 0, SEEK_SET) == (off_t) -1)
return -errno;
return log_warning_errno(errno, "Failed to seek to beginning of the core file: %m");
if (ret) {
c.f = open_memstream_unlocked(&buf, &sz);
if (!c.f)
return -ENOMEM;
return log_oom();
}
elf_version(EV_CURRENT);