bin/84664: gctl_free() isn't called in fdisk.c
Daan Vreeken [PA4DAN]
Danovitsch at Vitsch.net
Mon Aug 8 11:20:20 GMT 2005
>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 at 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:
More information about the freebsd-bugs
mailing list