From: Lennart Poettering Date: Mon, 4 Jul 2011 17:06:32 +0000 (+0200) Subject: password-agent: actually really don't access unallocated memory X-Git-Tag: v30~59 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ba7b871951ee120f1e9d5281debe00e2e42ba99;p=systemd password-agent: actually really don't access unallocated memory Fix for 9726f9ff11fa7b94dceed2972cd2453a08b9ee6a --- diff --git a/src/tty-ask-password-agent.c b/src/tty-ask-password-agent.c index 38442f66..02b959ea 100644 --- a/src/tty-ask-password-agent.c +++ b/src/tty-ask-password-agent.c @@ -384,9 +384,9 @@ static int parse_password(const char *filename, char **wall) { packet[0] = '+'; strcpy(packet+1, password); } - } - free(password); + free(password); + } } if (r == -ETIME || r == -ENOENT) {