summaryrefslogtreecommitdiff
path: root/src/journal/mmap-cache.c
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-12-17 00:42:49 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-12-17 00:42:49 -0500
commitccef261c077d31dce02aa92e519b23b3a2a58303 (patch)
tree582fafc98c76e98e912f453fb55ca57f29273d57 /src/journal/mmap-cache.c
parent5d4922bba91c6d60b3b9f38fb29fda0f6ba8338d (diff)
parent5fb2a20a29c2cc0494d5a31e175a8e3ff0b2d3e2 (diff)
Merge tag 'systemd/v232-4.parabola1' into systemd/parabola
Diffstat (limited to 'src/journal/mmap-cache.c')
-rw-r--r--src/journal/mmap-cache.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/journal/mmap-cache.c b/src/journal/mmap-cache.c
index 293d27053a..d91247b524 100644
--- a/src/journal/mmap-cache.c
+++ b/src/journal/mmap-cache.c
@@ -325,10 +325,8 @@ static FileDescriptor* fd_add(MMapCache *m, int fd) {
f->fd = fd;
r = hashmap_put(m->fds, FD_TO_PTR(fd), f);
- if (r < 0) {
- free(f);
- return NULL;
- }
+ if (r < 0)
+ return mfree(f);
return f;
}