]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journal-remote: fix memleak of the name of the remote source
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 14 May 2017 02:42:14 +0000 (22:42 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 19 May 2017 15:40:56 +0000 (11:40 -0400)
src/basic/journal-importer.c
src/journal-remote/journal-remote-parse.c

index 66119d2de14e0287dc228b2f6ee7232e59d75bed..7d72effdea9f30c57e8d4ca9b284f3359e3fbd64 100644 (file)
@@ -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);
 }
index 79afe6604c053805da62a5dfdb4fb7fe17f4d13a..d61d1c18f6850cee57e8be12e459ee904f6c3cec 100644 (file)
@@ -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) {