systemd/0045-journal-remote-fix-memleak-of-the-name-of-the-remote.patch
Zbigniew Jędrzejewski-Szmek d743bb5bcc Revert "Build with meson"
This reverts commits 3fb4a15096
and 0e8350ca14.

Either building with meson or other upstream changes was causing
issues with booting, and I didn't have time to debug this properly.
2017-06-27 13:42:28 -04:00

37 lines
1.4 KiB
Diff

From d56ab41b58a760907c5fda19b79bcb01aa9611d8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sat, 13 May 2017 22:42:14 -0400
Subject: [PATCH] journal-remote: fix memleak of the name of the remote source
(cherry picked from commit 2ddb70d26f9a284fbf38bca37ea857f24c3f39de)
---
src/basic/journal-importer.c | 1 +
src/journal-remote/journal-remote-parse.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/basic/journal-importer.c b/src/basic/journal-importer.c
index 66119d2de1..7d72effdea 100644
--- a/src/basic/journal-importer.c
+++ b/src/basic/journal-importer.c
@@ -69,6 +69,7 @@ void journal_importer_cleanup(JournalImporter *imp) {
safe_close(imp->fd);
}
+ free(imp->name);
free(imp->buf);
iovw_free_contents(&imp->iovw);
}
diff --git a/src/journal-remote/journal-remote-parse.c b/src/journal-remote/journal-remote-parse.c
index 79afe6604c..d61d1c18f6 100644
--- a/src/journal-remote/journal-remote-parse.c
+++ b/src/journal-remote/journal-remote-parse.c
@@ -41,7 +41,7 @@ void source_free(RemoteSource *source) {
/**
* Initialize zero-filled source with given values. On success, takes
- * ownerhship of fd and writer, otherwise does not touch them.
+ * ownership of fd, name, and writer, otherwise does not touch them.
*/
RemoteSource* source_new(int fd, bool passive_fd, char *name, Writer *writer) {