summaryrefslogtreecommitdiff
path: root/src/journal/coredump.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-09-09 15:20:10 +0200
committerLennart Poettering <lennart@poettering.net>2015-09-09 15:26:11 +0200
commit74ca738f6a01fb5fc19c5c3899f5cb1fdc1d7f68 (patch)
tree920d0abca454976756296d982d1cb9ef794e1ade /src/journal/coredump.c
parent9c00a6adfa6c2ded071222b2ec76295480add34e (diff)
util: introduce safe_fclose() and port everything over to it
Adds a coccinelle script to port things over automatically.
Diffstat (limited to 'src/journal/coredump.c')
-rw-r--r--src/journal/coredump.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/journal/coredump.c b/src/journal/coredump.c
index 62483a2a05..7d94b145c9 100644
--- a/src/journal/coredump.c
+++ b/src/journal/coredump.c
@@ -512,8 +512,7 @@ static int compose_open_fds(pid_t pid, char **open_fds) {
}
errno = 0;
- fclose(stream);
- stream = NULL;
+ stream = safe_fclose(stream);
if (errno != 0)
return -errno;