]> git.sesse.net Git - cubemap/commitdiff
Stop leaking the state fd on reload.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 13 Apr 2014 20:33:19 +0000 (22:33 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 13 Apr 2014 20:33:19 +0000 (22:33 +0200)
main.cpp

index abc7617d0ee3826cbde7ec0b119e0e0dfa91238f..28acd3962d6a5950e5a92487aed675c4ff2f2c4e 100644 (file)
--- 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)) {