From e89a7b8201c3356572afd52dbf95b820ee0ca8f8 Mon Sep 17 00:00:00 2001 From: mmcc Date: Tue, 22 Dec 2015 19:44:02 +0000 Subject: remove a NULL-check before free() --- usr.sbin/inetd/inetd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'usr.sbin/inetd/inetd.c') 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); -- cgit v1.2.3