From owner-cvs-all Mon Jul 17 12:51:47 2000 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id C3C5337B817; Mon, 17 Jul 2000 12:51:42 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id MAA48590; Mon, 17 Jul 2000 12:51:42 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Message-Id: <200007171951.MAA48590@freefall.freebsd.org> From: John Baldwin Date: Mon, 17 Jul 2000 12:51:42 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sbin/i386/fdisk fdisk.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG jhb 2000/07/17 12:51:42 PDT Modified files: sbin/i386/fdisk fdisk.c Log: - Don't try to free mboot.bootinst before it has been allocated. If, for some reason, mboot.bootinst is not initialized to NULL at the beginning of the program, then the last commit to this would try to free whatever bogus address is in it. - Restore the behavior of free()'ing the mboot.bootinst buffer after we abuse it to determine the sector size of the disk (as clearly noted in the comments). Properly fix the double free() bug by setting the pointer to NULL after we free it. Revision Changes Path 1.43 +3 -3 src/sbin/i386/fdisk/fdisk.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message