summaryrefslogtreecommitdiffstats
path: root/usr.sbin/lpr
diff options
context:
space:
mode:
authormmcc <mmcc@openbsd.org>2015-12-19 19:59:07 +0000
committermmcc <mmcc@openbsd.org>2015-12-19 19:59:07 +0000
commit3705bbe440ca24b5a80f8cb4eb2d3e171354b3fc (patch)
tree0f8e0c429bb608e9864a1d4f853faa1d7677d2c5 /usr.sbin/lpr
parentAdd pledge(2). It is not currently possible to pledge -u and -U (diff)
downloadwireguard-openbsd-3705bbe440ca24b5a80f8cb4eb2d3e171354b3fc.tar.xz
wireguard-openbsd-3705bbe440ca24b5a80f8cb4eb2d3e171354b3fc.zip
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);