]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/journal/mmap-cache.c
tree-wide: use mfree more
[thirdparty/systemd.git] / src / journal / mmap-cache.c
index 293d27053afe2e533f079f58aff6419defa6955d..d91247b52449988c91bc74507b218f03b1e9cf41 100644 (file)
@@ -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;
 }