summaryrefslogtreecommitdiff
path: root/usr.sbin/lpr
diff options
context:
space:
mode:
authormmcc <mmcc@cvs.openbsd.org>2015-12-19 19:59:08 +0000
committermmcc <mmcc@cvs.openbsd.org>2015-12-19 19:59:08 +0000
commitd2471b3ffa392bf0c0704851021ab50c8681a9d5 (patch)
tree9c9d2503f1636d0ba3c2314e4a8d466535d3ef1e /usr.sbin/lpr
parent478e2f1fe6ccc23cb7cc13a518e88ac3db4633ef (diff)
Remove NULL-check before free().
Diffstat (limited to 'usr.sbin/lpr')
-rw-r--r--usr.sbin/lpr/lpd/lpd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/lpr/lpd/lpd.c b/usr.sbin/lpr/lpd/lpd.c
index c457d41c6f8..c68b36e6277 100644
--- a/usr.sbin/lpr/lpd/lpd.c
+++ b/usr.sbin/lpr/lpd/lpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lpd.c,v 1.62 2015/10/28 13:25:55 millert Exp $ */
+/* $OpenBSD: lpd.c,v 1.63 2015/12/19 19:59:07 mmcc Exp $ */
/* $NetBSD: lpd.c,v 1.33 2002/01/21 14:42:29 wiz Exp $ */
/*
@@ -790,8 +790,7 @@ socksetup(int af, int options, const char *port)
if (socks == NULL || *socks == 0) {
syslog(LOG_ERR, "Couldn't bind to any socket");
- if (socks != NULL)
- free(socks);
+ free(socks);
mcleanup(0);
}
return(socks);