diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2014-12-20 13:45:16 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2014-12-20 13:45:16 +0000 |
commit | b4fd71609986337a901fdeddec0d0fc65faa0ef8 (patch) | |
tree | 50d7bf54f2e93ae447e2c20ef249eb13a9ba56c7 /sys/kern/subr_disk.c | |
parent | 50c92ed83fd1e61637a312caa4196cb5cce9371f (diff) |
Zap local variable that shadows another local variable. Fixes a panic caused
by passing random stack garbage as the size to free(9).
From David Imhoff
Diffstat (limited to 'sys/kern/subr_disk.c')
-rw-r--r-- | sys/kern/subr_disk.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c index b32688fc4e6..57f654d35d2 100644 --- a/sys/kern/subr_disk.c +++ b/sys/kern/subr_disk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_disk.c,v 1.175 2014/12/20 13:37:32 krw Exp $ */ +/* $OpenBSD: subr_disk.c,v 1.176 2014/12/20 13:45:15 kettenis Exp $ */ /* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */ /* @@ -650,7 +650,6 @@ readgptlabel(struct buf *bp, void (*strat)(struct buf *), uint32_t ghsize; uint32_t ghpartsize; uint32_t ghpartnum; - size_t gpsz; /* read header record */ bp->b_blkno = DL_BLKTOSEC(lp, part_blkno) * DL_BLKSPERSEC(lp); |