summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-08-10 20:11:43 +0200
committerGitHub <noreply@github.com>2019-08-10 20:11:43 +0200
commit3bc861cb110603ab9ece8526a4a962a31222add4 (patch)
treecf056ed2886c71e2bdb082d398eb2d229d163c36
parent926901d78d3af87b47ce0cfeafcf0e9a6d190334 (diff)
parent44126969f1b0fee257b79f0f3ba9ba74e1da1459 (diff)
downloadpodman-3bc861cb110603ab9ece8526a4a962a31222add4.tar.gz
podman-3bc861cb110603ab9ece8526a4a962a31222add4.tar.bz2
podman-3bc861cb110603ab9ece8526a4a962a31222add4.zip
Merge pull request #3748 from rhatdan/covscan
Fix a couple of errors descovered by coverity
-rw-r--r--pkg/rootless/rootless_linux.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkg/rootless/rootless_linux.c b/pkg/rootless/rootless_linux.c
index 19b76f387..f5d7e4711 100644
--- a/pkg/rootless/rootless_linux.c
+++ b/pkg/rootless/rootless_linux.c
@@ -457,6 +457,11 @@ create_pause_process (const char *pause_pid_file_path, char **argv)
}
r = TEMP_FAILURE_RETRY (write (p[1], "0", 1));
+ if (r < 0)
+ {
+ fprintf (stderr, "cannot write to pipe: %s\n", strerror (errno));
+ _exit (EXIT_FAILURE);
+ }
close (p[1]);
_exit (EXIT_SUCCESS);
@@ -811,6 +816,11 @@ reexec_in_user_namespace (int ready, char *pause_pid_file_path, char *file_to_re
}
ret = TEMP_FAILURE_RETRY (write (ready, "0", 1));
+ if (ret < 0)
+ {
+ fprintf (stderr, "cannot write to ready pipe: %s\n", strerror (errno));
+ _exit (EXIT_FAILURE);
+ }
close (ready);
if (sigprocmask (SIG_SETMASK, &oldsigset, NULL) < 0)