Merged from src/sbin/fdisk/fdisk.c revision 1.81.

- Call gctl_free() to free resource allocated with gctl_get_handle().

MFC after:	3 days
This commit is contained in:
Yoshihiro Takahashi 2005-09-18 02:38:29 +00:00
parent 62061bf002
commit a382309a4e

View File

@ -617,9 +617,12 @@ write_disk(off_t sector, void *buf)
gctl_ro_param(grq, "geom", -1, q);
gctl_ro_param(grq, "data", secsize, buf);
q = gctl_issue(grq);
if (q == NULL)
if (q == NULL) {
gctl_free(grq);
return(0);
}
warnx("%s", q);
gctl_free(grq);
error = pwrite(fd, buf, secsize, (sector * 512));
if (error == secsize)