summaryrefslogtreecommitdiffstats
path: root/usr.sbin/dhcpd/alloc.c
diff options
context:
space:
mode:
authormmcc <mmcc@openbsd.org>2015-12-21 21:39:11 +0000
committermmcc <mmcc@openbsd.org>2015-12-21 21:39:11 +0000
commit0582c210249bf7aeceeeb978c558242b6c94c4dc (patch)
tree534808225cc15a58aa6d90fe319bed78cafd1abe /usr.sbin/dhcpd/alloc.c
parentremove NULL-check before free() (diff)
downloadwireguard-openbsd-0582c210249bf7aeceeeb978c558242b6c94c4dc.tar.xz
wireguard-openbsd-0582c210249bf7aeceeeb978c558242b6c94c4dc.zip
remove NULL-checks before free()
Diffstat (limited to 'usr.sbin/dhcpd/alloc.c')
-rw-r--r--usr.sbin/dhcpd/alloc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/dhcpd/alloc.c b/usr.sbin/dhcpd/alloc.c
index 6b8f0069738..f42af8211d3 100644
--- a/usr.sbin/dhcpd/alloc.c
+++ b/usr.sbin/dhcpd/alloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: alloc.c,v 1.12 2010/01/02 04:21:16 krw Exp $ */
+/* $OpenBSD: alloc.c,v 1.13 2015/12/21 21:39:11 mmcc Exp $ */
/* Memory allocation... */
@@ -88,8 +88,7 @@ new_lease_state(char *name)
void
free_lease_state(struct lease_state *ptr, char *name)
{
- if (ptr->prl)
- free(ptr->prl);
+ free(ptr->prl);
ptr->next = free_lease_states;
free_lease_states = ptr;
}