|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
From 68a923966fcbce01bb867108a877e9c2fa783dc9 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
Date: Fri, 19 May 2017 12:52:05 -0400
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
Subject: [PATCH] journald: fix trivial memleak
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
Fixes #5516.
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
(cherry picked from commit c6e9e16f7702188127bf8dfbac45a87f8d1a3512)
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
src/journal/journald-server.c | 2 ++
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
src/journal/journald-server.h | 2 +-
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
2 files changed, 3 insertions(+), 1 deletion(-)
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
index 6466e46ccc..da85260ccd 100644
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
--- a/src/journal/journald-server.c
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
+++ b/src/journal/journald-server.c
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
@@ -2177,6 +2177,8 @@ void server_done(Server *s) {
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
free(s->tty_path);
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
free(s->cgroup_root);
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
free(s->hostname_field);
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
+ free(s->runtime_storage.path);
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
+ free(s->system_storage.path);
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
if (s->mmap)
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
mmap_cache_unref(s->mmap);
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
diff --git a/src/journal/journald-server.h b/src/journal/journald-server.h
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
index 75ac114d24..203460c50a 100644
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
--- a/src/journal/journald-server.h
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
+++ b/src/journal/journald-server.h
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
@@ -61,7 +61,7 @@ typedef struct JournalStorageSpace {
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
typedef struct JournalStorage {
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
const char *name;
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
- const char *path;
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
+ char *path;
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
JournalMetrics metrics;
|
|
Zbigniew Jędrzejewski-Szmek |
f4a676 |
JournalStorageSpace space;
|