-/* $OpenBSD: kern_malloc.c,v 1.131 2017/11/14 06:46:43 dlg Exp $ */
+/* $OpenBSD: kern_malloc.c,v 1.132 2018/01/02 06:07:21 guenther Exp $ */
/* $NetBSD: kern_malloc.c,v 1.15.4.2 1996/06/13 17:10:56 cgd Exp $ */
/*
if (freedsize != 0 && freedsize > size)
panic("free: size too large %zu > %ld (%p) type %s",
freedsize, size, addr, memname[type]);
- if (freedsize != 0 && size > MINALLOCSIZE && freedsize < size / 2)
- panic("free: size too small %zu < %ld / 2 (%p) type %s",
+ if (freedsize != 0 && size > MINALLOCSIZE && freedsize <= size / 2)
+ panic("free: size too small %zu <= %ld / 2 (%p) type %s",
freedsize, size, addr, memname[type]);
/*
* Check for returns of data that do not point to the