From: Steinar H. Gunderson Date: Sun, 13 Apr 2014 20:33:19 +0000 (+0200) Subject: Stop leaking the state fd on reload. X-Git-Tag: 1.1.0~18 X-Git-Url: https://git.sesse.net/?p=cubemap;a=commitdiff_plain;h=4f982039cd792ee3e3629bb00f7223c2c19c96e9 Stop leaking the state fd on reload. --- 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)) {