summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/installboot/i386_installboot.c5
-rw-r--r--usr.sbin/kvm_mkdb/nlist.c5
-rw-r--r--usr.sbin/ldapd/ber.c5
-rw-r--r--usr.sbin/ldapd/ssl.c5
4 files changed, 8 insertions, 12 deletions
diff --git a/usr.sbin/installboot/i386_installboot.c b/usr.sbin/installboot/i386_installboot.c
index 599c53b4559..8c9bb2640dc 100644
--- a/usr.sbin/installboot/i386_installboot.c
+++ b/usr.sbin/installboot/i386_installboot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i386_installboot.c,v 1.20 2015/12/01 19:10:16 krw Exp $ */
+/* $OpenBSD: i386_installboot.c,v 1.21 2015/12/10 18:40:46 mmcc Exp $ */
/* $NetBSD: installboot.c,v 1.5 1995/11/17 23:23:50 gwr Exp $ */
/*
@@ -369,8 +369,7 @@ rmdir:
if (rmdir(dst) == -1)
err(1, "rmdir('%s') failed", dst);
- if (src)
- free(src);
+ free(src);
if (rslt == -1)
exit(1);
diff --git a/usr.sbin/kvm_mkdb/nlist.c b/usr.sbin/kvm_mkdb/nlist.c
index ed325d95368..629af583389 100644
--- a/usr.sbin/kvm_mkdb/nlist.c
+++ b/usr.sbin/kvm_mkdb/nlist.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nlist.c,v 1.48 2015/08/20 22:39:29 deraadt Exp $ */
+/* $OpenBSD: nlist.c,v 1.49 2015/12/10 18:40:46 mmcc Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -297,8 +297,7 @@ done:
munmap(strtab, symstrsize);
}
(void)fclose(fp);
- if (sh)
- free(sh);
+ free(sh);
return (error);
}
diff --git a/usr.sbin/ldapd/ber.c b/usr.sbin/ldapd/ber.c
index fcc0dfdb4eb..ce0181d0707 100644
--- a/usr.sbin/ldapd/ber.c
+++ b/usr.sbin/ldapd/ber.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ber.c,v 1.9 2015/12/05 16:26:45 claudio Exp $ */
+/* $OpenBSD: ber.c,v 1.10 2015/12/10 18:40:46 mmcc Exp $ */
/*
* Copyright (c) 2007 Reyk Floeter <reyk@vantronix.net>
@@ -1224,8 +1224,7 @@ ber_set_application(struct ber *b, unsigned long (*cb)(struct ber_element *))
void
ber_free(struct ber *b)
{
- if (b->br_wbuf != NULL)
- free (b->br_wbuf);
+ free(b->br_wbuf);
}
static ssize_t
diff --git a/usr.sbin/ldapd/ssl.c b/usr.sbin/ldapd/ssl.c
index 759a18f291a..0e6090d3580 100644
--- a/usr.sbin/ldapd/ssl.c
+++ b/usr.sbin/ldapd/ssl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl.c,v 1.8 2015/01/16 16:04:38 deraadt Exp $ */
+/* $OpenBSD: ssl.c,v 1.9 2015/12/10 18:40:46 mmcc Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -252,8 +252,7 @@ ssl_load_file(const char *name, off_t *len)
return (buf);
fail:
- if (buf != NULL)
- free(buf);
+ free(buf);
close(fd);
return (NULL);
}