coredump: always log on failure in parse_core()

This commit is contained in:
Luca Boccassi
2021-11-30 16:49:58 +00:00
parent f0e2377a68
commit f05b5cddfb
+2 -2
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);