Skip to content

Commit

Permalink
Merge pull request #140 from nalind/close-journald
Browse files Browse the repository at this point in the history
Close the tempfile when journaling large messages
  • Loading branch information
jonboulle committed Feb 2, 2016
2 parents 2ed5b50 + ff118ad commit 7b2428f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions journal/journal.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ func Send(message string, priority Priority, vars map[string]string) error {
if err != nil {
return journalError(err.Error())
}
defer file.Close()
_, err = io.Copy(file, data)
if err != nil {
return journalError(err.Error())
Expand Down

0 comments on commit 7b2428f

Please sign in to comment.