journal-remote: fix memleak of the name of the remote source

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2017-05-13 22:42:14 -04:00
parent 731e10f3c5
commit 2ddb70d26f
2 changed files with 2 additions and 1 deletions

View 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);
}

View 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) {