summaryrefslogtreecommitdiff
path: root/usr.bin/tn3270/sys_curses
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2003-10-22 23:05:12 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2003-10-22 23:05:12 +0000
commit6c3d448b72bd57964184db05cd40d96526d47f46 (patch)
treeba3407e3287b3a12e3b28ebc56ebd128a00c4968 /usr.bin/tn3270/sys_curses
parent0664cae15abf02851288841d75ddd0a09f6d1d08 (diff)
err on strdup failure. from vink joris.
Diffstat (limited to 'usr.bin/tn3270/sys_curses')
-rw-r--r--usr.bin/tn3270/sys_curses/system.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/tn3270/sys_curses/system.c b/usr.bin/tn3270/sys_curses/system.c
index 5b5a89291ca..858b8c0e7db 100644
--- a/usr.bin/tn3270/sys_curses/system.c
+++ b/usr.bin/tn3270/sys_curses/system.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: system.c,v 1.15 2003/07/10 00:06:51 david Exp $ */
+/* $OpenBSD: system.c,v 1.16 2003/10/22 23:05:11 tedu Exp $ */
/*-
* Copyright (c) 1988 The Regents of the University of California.
@@ -31,7 +31,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)system.c 4.5 (Berkeley) 4/26/91";*/
-static char rcsid[] = "$OpenBSD: system.c,v 1.15 2003/07/10 00:06:51 david Exp $";
+static char rcsid[] = "$OpenBSD: system.c,v 1.16 2003/10/22 23:05:11 tedu Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -638,13 +638,15 @@ char *argv[];
struct timeval tv;
long ikey;
- keyname = strdup("/tmp/apiXXXXXXXXXX");
+ if ((keyname = strdup("/tmp/apiXXXXXXXXXX")) == NULL)
+ err(1, "strdup");
if ((fd = mkstemp(keyname)) == -1) {
perror("open");
free(keyname);
return 0;
}
- keyname = strdup(sockNAME);
+ if ((keyname = strdup(sockNAME)) == NULL)
+ err(1, "strdup");
/* Now, get seed for random */