[systemd-devel] [PATCH 2/2] Initializing socket_fd inside ask_agent.

Luis Felipe Strano Moraes luis.strano at gmail.com
Thu Sep 16 19:30:01 PDT 2010


Garbage value could have been used if there was an error creating the
password file.
---
 src/ask-password.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/ask-password.c b/src/ask-password.c
index 22dda97..bcee686 100644
--- a/src/ask-password.c
+++ b/src/ask-password.c
@@ -171,7 +171,7 @@ static int ask_agent(void) {
         int fd = -1, r;
         FILE *f = NULL;
         char *socket_name = NULL;
-        int socket_fd, signal_fd;
+        int socket_fd = -1, signal_fd;
         sigset_t mask;
         usec_t not_after;
 
-- 
1.7.2.3



More information about the systemd-devel mailing list