From 4f982039cd792ee3e3629bb00f7223c2c19c96e9 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 13 Apr 2014 22:33:19 +0200 Subject: [PATCH] Stop leaking the state fd on reload. --- main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index abc7617..28acd39 100644 --- a/main.cpp +++ b/main.cpp @@ -393,7 +393,7 @@ start: if (state_fd != -1) { log(INFO, "Deserializing state from previous process..."); string serialized; - if (!read_tempfile(state_fd, &serialized)) { + if (!read_tempfile_and_close(state_fd, &serialized)) { exit(1); } if (!loaded_state.ParseFromString(serialized)) { -- 2.39.2