From b4fd71609986337a901fdeddec0d0fc65faa0ef8 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sat, 20 Dec 2014 13:45:16 +0000 Subject: 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 --- sys/kern/subr_disk.c | 3 +-- 1 file changed, 1 insertion(+), 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); -- cgit v1.2.3