diff options
| author | 2015-08-30 03:09:14 +0000 | |
|---|---|---|
| committer | 2015-08-30 03:09:14 +0000 | |
| commit | d21cd5d039c02cf351712b1280ccacf876aeaf8d (patch) | |
| tree | 9b368b7d049d129d0a971e03df87d4490d57e64e /sys/dev/diskmap.c | |
| parent | Keep track of a length for free() in error paths. Be careful, (diff) | |
| download | wireguard-openbsd-d21cd5d039c02cf351712b1280ccacf876aeaf8d.tar.xz wireguard-openbsd-d21cd5d039c02cf351712b1280ccacf876aeaf8d.zip | |
size for free(); ok krw
Diffstat (limited to 'sys/dev/diskmap.c')
| -rw-r--r-- | sys/dev/diskmap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/diskmap.c b/sys/dev/diskmap.c index 6086384da6b..66ed327200d 100644 --- a/sys/dev/diskmap.c +++ b/sys/dev/diskmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diskmap.c,v 1.11 2015/05/07 08:53:33 mpi Exp $ */ +/* $OpenBSD: diskmap.c,v 1.12 2015/08/30 03:09:14 deraadt Exp $ */ /* * Copyright (c) 2009, 2010 Joel Sing <jsing@openbsd.org> @@ -118,7 +118,7 @@ diskmapioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p) FRELE(fp, p); fdpunlock(fdp); - free(devname, M_DEVBUF, 0); + free(devname, M_DEVBUF, PATH_MAX); return 0; @@ -131,7 +131,7 @@ bad: fdpunlock(fdp); invalid: - free(devname, M_DEVBUF, 0); + free(devname, M_DEVBUF, PATH_MAX); return (error); } |
