summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2003-09-26 15:55:22 +0000
committerderaadt <deraadt@openbsd.org>2003-09-26 15:55:22 +0000
commitd086afddbb3206dcf8ed143c8ad04d7d3bc7a43a (patch)
tree8d6876288fa7abbbe57fb6e74b80048dfa1834ae
parentcorrect scanf sizes; anil aaron ok (diff)
downloadwireguard-openbsd-d086afddbb3206dcf8ed143c8ad04d7d3bc7a43a.tar.xz
wireguard-openbsd-d086afddbb3206dcf8ed143c8ad04d7d3bc7a43a.zip
free(NULL) works; jjy2+@pitt.edu
-rw-r--r--bin/rmail/rmail.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/bin/rmail/rmail.c b/bin/rmail/rmail.c
index 25e51311da0..53ab74139a8 100644
--- a/bin/rmail/rmail.c
+++ b/bin/rmail/rmail.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rmail.c,v 1.18 2003/09/24 21:11:46 deraadt Exp $ */
+/* $OpenBSD: rmail.c,v 1.19 2003/09/26 15:55:22 deraadt Exp $ */
/* $NetBSD: rmail.c,v 1.8 1995/09/07 06:51:50 jtc Exp $ */
/*
@@ -40,7 +40,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)rmail.c 8.3 (Berkeley) 5/15/95";
#else
-static char rcsid[] = "$OpenBSD: rmail.c,v 1.18 2003/09/24 21:11:46 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: rmail.c,v 1.19 2003/09/26 15:55:22 deraadt Exp $";
#endif
#endif /* not lint */
@@ -223,8 +223,7 @@ main(int argc, char *argv[])
*p = '\0';
if (*addrp == '\0')
addrp = "<>";
- if (from_user != NULL)
- free(from_user);
+ free(from_user);
if ((from_user = strdup(addrp)) == NULL)
err(EX_TEMPFAIL, NULL);