diff options
| author | itojun <itojun@NetBSD.org> | 2002-11-16 15:41:17 +0000 |
|---|---|---|
| committer | itojun <itojun@NetBSD.org> | 2002-11-16 15:41:17 +0000 |
| commit | 35ddf151dce78388faed2af6e58dd3bad7ddd6ed (patch) | |
| tree | 76909a1775644b7dec814e1f0bb58ea5de34b711 /libexec | |
| parent | 967caa5cd209fd57bead9c55772cb4c7b8388348 (diff) | |
die if strdup fails
Diffstat (limited to 'libexec')
| -rw-r--r-- | libexec/mail.local/mail.local.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libexec/mail.local/mail.local.c b/libexec/mail.local/mail.local.c index c72ce993b3a..74b7893b5f6 100644 --- a/libexec/mail.local/mail.local.c +++ b/libexec/mail.local/mail.local.c @@ -1,4 +1,4 @@ -/* $NetBSD: mail.local.c,v 1.20 2002/05/26 00:02:08 wiz Exp $ */ +/* $NetBSD: mail.local.c,v 1.21 2002/11/16 15:41:17 itojun Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -40,7 +40,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 1993, 1994\n\ #if 0 static char sccsid[] = "@(#)mail.local.c 8.22 (Berkeley) 6/21/95"; #else -__RCSID("$NetBSD: mail.local.c,v 1.20 2002/05/26 00:02:08 wiz Exp $"); +__RCSID("$NetBSD: mail.local.c,v 1.21 2002/11/16 15:41:17 itojun Exp $"); #endif #endif /* not lint */ @@ -140,6 +140,8 @@ store(from) char *tn, line[2048]; tn = strdup(_PATH_LOCTMP); + if (!tn) + err(FATAL, "not enough core"); if ((fd = mkstemp(tn)) == -1 || !(fp = fdopen(fd, "w+"))) err(FATAL, "unable to open temporary file"); (void)unlink(tn); |
