diff options
Diffstat (limited to 'src/journal/stacktrace.c')
-rw-r--r-- | src/journal/stacktrace.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/journal/stacktrace.c b/src/journal/stacktrace.c index 706c08eac7..98a54ff269 100644 --- a/src/journal/stacktrace.c +++ b/src/journal/stacktrace.c @@ -177,8 +177,7 @@ int coredump_make_stack_trace(int fd, const char *executable, char **ret) { goto finish; } - fclose(c.f); - c.f = NULL; + c.f = safe_fclose(c.f); *ret = buf; buf = NULL; @@ -192,8 +191,7 @@ finish: if (c.elf) elf_end(c.elf); - if (c.f) - fclose(c.f); + safe_fclose(c.f); free(buf); |