Merge "Fail gracefully when we fail to fork the update binary"
diff --git a/install.cpp b/install.cpp
index 98f1e3f..f124a26 100644
--- a/install.cpp
+++ b/install.cpp
@@ -373,6 +373,14 @@
     }
 
     pid_t pid = fork();
+
+    if (pid == -1) {
+        close(pipefd[0]);
+        close(pipefd[1]);
+        PLOG(ERROR) << "Failed to fork update binary";
+        return INSTALL_ERROR;
+    }
+
     if (pid == 0) {
         umask(022);
         close(pipefd[0]);