From: kettenis Date: Sat, 20 Dec 2014 13:45:15 +0000 (+0000) Subject: Zap local variable that shadows another local variable. Fixes a panic caused X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=0dcd7e69f1dbca8e2dd0a7f0e0ad825cb4cf5b33;p=openbsd 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 --- 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);