]> err.no Git - systemd/commitdiff
ask-password. Initializing socket_fd inside ask_agent.
authorLuis Felipe Strano Moraes <luis.strano@gmail.com>
Fri, 17 Sep 2010 02:30:01 +0000 (23:30 -0300)
committerLennart Poettering <lennart@poettering.net>
Mon, 20 Sep 2010 22:29:37 +0000 (00:29 +0200)
Garbage value could have been used if there was an error creating the
password file.

src/ask-password.c

index 22dda974c5fac62e33c172cb11aaf98e804dd127..bcee6863c996e85a22ed2ebfe572fcc2de71ef5d 100644 (file)
@@ -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;