summaryrefslogtreecommitdiff
path: root/src/journal-remote/journal-remote-parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal-remote/journal-remote-parse.c')
-rw-r--r--src/journal-remote/journal-remote-parse.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/journal-remote/journal-remote-parse.c b/src/journal-remote/journal-remote-parse.c
index fe21bd3e1d..a08ca2fdcb 100644
--- a/src/journal-remote/journal-remote-parse.c
+++ b/src/journal-remote/journal-remote-parse.c
@@ -30,11 +30,14 @@ void source_free(RemoteSource *source) {
if (source->fd >= 0) {
log_debug("Closing fd:%d (%s)", source->fd, source->name);
- close(source->fd);
+ safe_close(source->fd);
}
free(source->name);
free(source->buf);
iovw_free_contents(&source->iovw);
+
+ sd_event_source_unref(source->event);
+
free(source);
}