diff options
author | mmcc <mmcc@cvs.openbsd.org> | 2015-12-22 19:44:02 +0000 |
---|---|---|
committer | mmcc <mmcc@cvs.openbsd.org> | 2015-12-22 19:44:02 +0000 |
commit | e89a7b8201c3356572afd52dbf95b820ee0ca8f8 (patch) | |
tree | 4f32d6f17dbc28c5e29745840995af771d8d5b8c /usr.sbin/inetd/inetd.c | |
parent | dc0cf01fcef8e0d98d3d7437bb9178217c132ed9 (diff) |
remove a NULL-check before free()
Diffstat (limited to 'usr.sbin/inetd/inetd.c')
-rw-r--r-- | usr.sbin/inetd/inetd.c | 5 |
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); |