summaryrefslogtreecommitdiff
path: root/usr.sbin/inetd/inetd.c
diff options
context:
space:
mode:
authormmcc <mmcc@cvs.openbsd.org>2015-12-22 19:44:02 +0000
committermmcc <mmcc@cvs.openbsd.org>2015-12-22 19:44:02 +0000
commite89a7b8201c3356572afd52dbf95b820ee0ca8f8 (patch)
tree4f32d6f17dbc28c5e29745840995af771d8d5b8c /usr.sbin/inetd/inetd.c
parentdc0cf01fcef8e0d98d3d7437bb9178217c132ed9 (diff)
remove a NULL-check before free()
Diffstat (limited to 'usr.sbin/inetd/inetd.c')
-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);