summaryrefslogtreecommitdiffstats
path: root/usr.sbin/netgroup_mkdb
diff options
context:
space:
mode:
authormmcc <mmcc@openbsd.org>2015-12-19 20:37:11 +0000
committermmcc <mmcc@openbsd.org>2015-12-19 20:37:11 +0000
commit0f2e022063138d3abad6752a4aa70afbf3804f56 (patch)
treeb443df0155975b00516f27a2451b03eb9d48facb /usr.sbin/netgroup_mkdb
parentRemove NULL-check before free(). (diff)
downloadwireguard-openbsd-0f2e022063138d3abad6752a4aa70afbf3804f56.tar.xz
wireguard-openbsd-0f2e022063138d3abad6752a4aa70afbf3804f56.zip
Remove NULL-checks before free().
Diffstat (limited to 'usr.sbin/netgroup_mkdb')
-rw-r--r--usr.sbin/netgroup_mkdb/stringlist.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.sbin/netgroup_mkdb/stringlist.c b/usr.sbin/netgroup_mkdb/stringlist.c
index d1fbe15700a..d1dea752d5d 100644
--- a/usr.sbin/netgroup_mkdb/stringlist.c
+++ b/usr.sbin/netgroup_mkdb/stringlist.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: stringlist.c,v 1.2 2015/10/01 13:04:42 jsg Exp $ */
+/* $OpenBSD: stringlist.c,v 1.3 2015/12/19 20:37:11 mmcc Exp $ */
/*
* Copyright (c) 1994 Christos Zoulas
@@ -221,11 +221,9 @@ getnetgroup(char **pp)
return ng;
baddomain:
- if (ng->ng_user)
- free(ng->ng_user);
+ free(ng->ng_user);
baduser:
- if (ng->ng_host)
- free(ng->ng_host);
+ free(ng->ng_host);
badhost:
free(ng);
return NULL;