diff options
author | Tobias Stoeckmann <tobias@cvs.openbsd.org> | 2009-09-05 14:04:39 +0000 |
---|---|---|
committer | Tobias Stoeckmann <tobias@cvs.openbsd.org> | 2009-09-05 14:04:39 +0000 |
commit | cdcddd879b0146dd3a452f32dc53867fce692d9b (patch) | |
tree | b7edd83dc5a9c4e0e65cba32aa3eb72ee92a8502 | |
parent | 7228e7cd652a9274ee9d18d7c4e52b2f5c098ae3 (diff) |
- properly free fqdn if it gets reassigned due to multiple -h options
- fixed comment typos
with input by and ok millert, otto
-rw-r--r-- | usr.bin/login/login.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/login/login.c b/usr.bin/login/login.c index cfb18042398..06b1051641b 100644 --- a/usr.bin/login/login.c +++ b/usr.bin/login/login.c @@ -1,4 +1,4 @@ -/* $OpenBSD: login.c,v 1.59 2009/08/31 22:25:43 martynas Exp $ */ +/* $OpenBSD: login.c,v 1.60 2009/09/05 14:04:38 tobias Exp $ */ /* $NetBSD: login.c,v 1.13 1996/05/15 23:50:16 jtc Exp $ */ /*- @@ -73,7 +73,7 @@ static const char copyright[] = #if 0 static const char sccsid[] = "@(#)login.c 8.4 (Berkeley) 4/2/94"; #endif -static const char rcsid[] = "$OpenBSD: login.c,v 1.59 2009/08/31 22:25:43 martynas Exp $"; +static const char rcsid[] = "$OpenBSD: login.c,v 1.60 2009/09/05 14:04:38 tobias Exp $"; #endif /* not lint */ /* @@ -205,6 +205,7 @@ main(int argc, char *argv[]) warnx("-h option: %s", strerror(EPERM)); quickexit(1); } + free(fqdn); if ((fqdn = strdup(optarg)) == NULL) { warn(NULL); quickexit(1); @@ -472,7 +473,7 @@ main(int argc, char *argv[]) backoff = (int)login_getcapnum(lc, "login-backoff", 3, 3); /* - * Turn off the fflag if we have an an invalid user + * Turn off the fflag if we have an invalid user * or we are not root and we are trying to change uids. */ if (!pwd || (uid && uid != pwd->pw_uid)) @@ -770,7 +771,7 @@ failed: /* * Allow for a '.' and 16 characters for any instance as well as - * space for a ':' and 16 charcters defining the authentication type. + * space for a ':' and 16 characters defining the authentication type. */ #define NBUFSIZ (UT_NAMESIZE + 1 + 16 + 1 + 16) |