Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Aug 2005 13:15:43 +0200 (CEST)
From:      "Daan Vreeken [PA4DAN]" <Danovitsch@Vitsch.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/84664: gctl_free() isn't called in fdisk.c
Message-ID:  <200508081115.j78BFhmY048923@Vitsch.net>
Resent-Message-ID: <200508081120.j78BKJd0014003@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         84664
>Category:       bin
>Synopsis:       gctl_free() isn't called in fdisk.c
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 08 11:20:18 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Daan Vreeken [PA4DAN]
>Release:        FreeBSD 5.4-RELEASE i386
>Organization:
Vitsch Electronics
>Environment:
System: FreeBSD Racebeest.Vitsch.LAN 5.4-RELEASE FreeBSD 5.4-RELEASE #5: Sun Aug 7 19:58:10 CEST 2005 root@Racebeest.Vitsch.LAN:/usr/src/sys/i386/compile/Laptop i386


	
>Description:
	In the current version of fdisk.c gctl_get_handle() and gctl_issue()
are called in order to update the MBR of a disk without a corresponding call
to gctl_free().

>How-To-Repeat:
	n/a

>Fix:
	Apply the following patch to src/sbin/fdisk/fdisk.c :

--- fdisk.c.patch begins here ---
--- src/sbin/fdisk/fdisk.c.1_80	Mon Aug  8 13:05:02 2005
+++ src/sbin/fdisk/fdisk.c	Mon Aug  8 13:06:09 2005
@@ -761,6 +761,7 @@
 	gctl_ro_param(grq, "geom", -1, q);
 	gctl_ro_param(grq, "data", secsize, buf);
 	q = gctl_issue(grq);
+	gctl_free(grq);
 	if (q == NULL)
 		return(0);
 	warnx("%s", q);
--- fdisk.c.patch ends here ---



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200508081115.j78BFhmY048923>