diff options
author | 2014-10-30 19:07:54 +0000 | |
---|---|---|
committer | 2014-10-30 19:07:54 +0000 | |
commit | 9da0d26da6d8ae5b745846aeeeed23cafe1ab14e (patch) | |
tree | b6f34150684db97aff841e5ecb88df5cdae3c811 /sys/dev/softraid.c | |
parent | Do not use void * for pointer artithmetics, it's a GNU extension, from (diff) | |
download | wireguard-openbsd-9da0d26da6d8ae5b745846aeeeed23cafe1ab14e.tar.xz wireguard-openbsd-9da0d26da6d8ae5b745846aeeeed23cafe1ab14e.zip |
muliply to get correct size for free. reported by kspillner
Diffstat (limited to 'sys/dev/softraid.c')
-rw-r--r-- | sys/dev/softraid.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c index 81436a0f056..233c9defb7e 100644 --- a/sys/dev/softraid.c +++ b/sys/dev/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.342 2014/10/30 17:23:45 tedu Exp $ */ +/* $OpenBSD: softraid.c,v 1.343 2014/10/30 19:07:54 tedu Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org> @@ -1490,7 +1490,7 @@ unwind: free(sdk, M_DEVBUF, 0); } - free(devs, M_DEVBUF, BIOC_CRMAXLEN); + free(devs, M_DEVBUF, BIOC_CRMAXLEN * sizeof(dev_t)); free(ondisk, M_DEVBUF, BIOC_CRMAXLEN * sizeof(u_int64_t)); return (rv); |