Skip to content

Commit 7b2428f

Browse files
committed
Merge pull request #140 from nalind/close-journald
Close the tempfile when journaling large messages
2 parents 2ed5b50 + ff118ad commit 7b2428f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

journal/journal.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ func Send(message string, priority Priority, vars map[string]string) error {
9090
if err != nil {
9191
return journalError(err.Error())
9292
}
93+
defer file.Close()
9394
_, err = io.Copy(file, data)
9495
if err != nil {
9596
return journalError(err.Error())

0 commit comments

Comments
 (0)