check malloc and strdup

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4129 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1997-12-05 04:26:29 +00:00
parent a1f7459397
commit 9e36ab86f3
3 changed files with 38 additions and 13 deletions

View File

@@ -601,6 +601,8 @@ main(int argc, char **argv)
if (p == NULL)
errx(1, "Who are you?");
user = strdup (p->pw_name);
if (user == NULL)
errx (1, "strdup: out of memory");
}
if (port == 0)
port = k_getportbyname ("kx", "tcp", htons(KX_PORT));