]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journald: fix trivial memleak 5960/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 19 May 2017 16:52:05 +0000 (12:52 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 19 May 2017 23:15:26 +0000 (19:15 -0400)
Fixes #5516.

src/journal/journald-server.c
src/journal/journald-server.h

index 667dfa00ff219f20bca593d011ff44a13fc9786e..08289200c5bd1e4b702685e70c43f7784f2860ce 100644 (file)
@@ -2177,6 +2177,8 @@ void server_done(Server *s) {
         free(s->tty_path);
         free(s->cgroup_root);
         free(s->hostname_field);
+        free(s->runtime_storage.path);
+        free(s->system_storage.path);
 
         if (s->mmap)
                 mmap_cache_unref(s->mmap);
index 75ac114d2493b30442a16891f4da44a4ae3023fb..203460c50ac756cfda5bf264ea924eac63af87f5 100644 (file)
@@ -61,7 +61,7 @@ typedef struct JournalStorageSpace {
 
 typedef struct JournalStorage {
         const char *name;
-        const char *path;
+        char *path;
 
         JournalMetrics metrics;
         JournalStorageSpace space;