summaryrefslogtreecommitdiff
path: root/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote-write.c
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-12-17 03:11:52 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-12-17 03:11:52 -0500
commitb849891b5dde5ee14ab8b7b7db74e65a4a38d993 (patch)
tree29bb0e6fda9b4b170041913de495da057bbe3621 /src/grp-journal/grp-remote/systemd-journal-remote/journal-remote-write.c
parent004efebf9cc559ea131bb9460ee0ee198e2d5da7 (diff)
parent881228ff72434a0e3401a16bd87f179ef0ab1619 (diff)
Merge branch 'notsystemd/postmove' into notsystemd/master
# Conflicts: # src/grp-journal/libjournal-core/.gitignore # src/grp-system/libcore/include/core/mount.h
Diffstat (limited to 'src/grp-journal/grp-remote/systemd-journal-remote/journal-remote-write.c')
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-remote/journal-remote-write.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote-write.c b/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote-write.c
index 31abdc76d2..99b02602ea 100644
--- a/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote-write.c
+++ b/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote-write.c
@@ -76,10 +76,8 @@ Writer* writer_new(RemoteServer *server) {
memset(&w->metrics, 0xFF, sizeof(w->metrics));
w->mmap = mmap_cache_new();
- if (!w->mmap) {
- free(w);
- return NULL;
- }
+ if (!w->mmap)
+ return mfree(w);
w->n_ref = 1;
w->server = server;
@@ -104,9 +102,7 @@ Writer* writer_free(Writer *w) {
if (w->mmap)
mmap_cache_unref(w->mmap);
- free(w);
-
- return NULL;
+ return mfree(w);
}
Writer* writer_unref(Writer *w) {