summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2015-12-17 16:59:27 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2015-12-17 16:59:27 +0000
commit76e4874c481f57790e3cc8ec174376b8c6d05939 (patch)
tree43f36619da738e0d0808413d4725223700b62060 /sys
parente2a03bdbfe75d11d180593a19db8969ac2de08ab (diff)
no need to check null before free
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_descrip.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index af9724958d1..caaf491900d 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_descrip.c,v 1.126 2015/12/17 16:49:07 tedu Exp $ */
+/* $OpenBSD: kern_descrip.c,v 1.127 2015/12/17 16:59:26 tedu Exp $ */
/* $NetBSD: kern_descrip.c,v 1.42 1996/03/30 22:24:38 christos Exp $ */
/*
@@ -1092,10 +1092,8 @@ fdfree(struct proc *p)
vrele(fdp->fd_cdir);
if (fdp->fd_rdir)
vrele(fdp->fd_rdir);
- if (fdp->fd_knlist)
- free(fdp->fd_knlist, M_TEMP, fdp->fd_knlistsize * sizeof(struct klist));
- if (fdp->fd_knhash)
- free(fdp->fd_knhash, M_TEMP, 0);
+ free(fdp->fd_knlist, M_TEMP, fdp->fd_knlistsize * sizeof(struct klist));
+ free(fdp->fd_knhash, M_TEMP, 0);
pool_put(&fdesc_pool, fdp);
}