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 66119d2..7d72eff 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 79afe66..d61d1c1 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) {