[systemd-devel] [PATCH 2/2] tty-ask-password-agent: fix CID 996261
Susant Sahani
susant at redhat.com
Tue Nov 11 02:33:42 PST 2014
Unchecked return value from library
---
src/tty-ask-password-agent/tty-ask-password-agent.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/tty-ask-password-agent/tty-ask-password-agent.c b/src/tty-ask-password-agent/tty-ask-password-agent.c
index e6dc84b..c4cd387 100644
--- a/src/tty-ask-password-agent/tty-ask-password-agent.c
+++ b/src/tty-ask-password-agent/tty-ask-password-agent.c
@@ -376,7 +376,9 @@ static int wall_tty_block(void) {
return -ENOMEM;
mkdir_parents_label(p, 0700);
- mkfifo(p, 0600);
+ r = mkfifo(p, 0600);
+ if (r < 0)
+ return -errno;
fd = open(p, O_RDONLY|O_CLOEXEC|O_NONBLOCK|O_NOCTTY);
if (fd < 0)
--
2.1.0
More information about the systemd-devel
mailing list