summaryrefslogtreecommitdiffstats
path: root/usr.sbin/inetd
diff options
context:
space:
mode:
authormmcc <mmcc@openbsd.org>2015-12-22 19:44:01 +0000
committermmcc <mmcc@openbsd.org>2015-12-22 19:44:01 +0000
commit626fd955e6009fad973eb4e233277db49fadb9bc (patch)
tree487f5773e38e05444bd250cf9df765f4afa6a222 /usr.sbin/inetd
parentcast toupper's argument to unsigned char (diff)
downloadwireguard-openbsd-626fd955e6009fad973eb4e233277db49fadb9bc.tar.xz
wireguard-openbsd-626fd955e6009fad973eb4e233277db49fadb9bc.zip
remove a NULL-check before free()
Diffstat (limited to 'usr.sbin/inetd')
-rw-r--r--usr.sbin/inetd/inetd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/inetd/inetd.c b/usr.sbin/inetd/inetd.c
index 461a89f137f..a2eb45321a2 100644
--- a/usr.sbin/inetd/inetd.c
+++ b/usr.sbin/inetd/inetd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: inetd.c,v 1.149 2015/11/01 19:59:28 deraadt Exp $ */
+/* $OpenBSD: inetd.c,v 1.150 2015/12/22 19:44:01 mmcc Exp $ */
/*
* Copyright (c) 1983,1991 The Regents of the University of California.
@@ -1014,8 +1014,7 @@ struct servtab *dupconfig(struct servtab *);
int
setconfig(void)
{
- if (defhost)
- free(defhost);
+ free(defhost);
defhost = newstr("*");
if (fconfig != NULL) {
fseek(fconfig, 0L, SEEK_SET);