diff options
author | nyan <nyan@FreeBSD.org> | 2005-09-18 02:38:29 +0000 |
---|---|---|
committer | nyan <nyan@FreeBSD.org> | 2005-09-18 02:38:29 +0000 |
commit | 0cc2091b50692c87aaca94f70e6640ed13044139 (patch) | |
tree | 1d3ac9334897e721f4e9ab5bdcc67950b0a303cb /sbin/fdisk_pc98 | |
parent | 7808a8bb7e11b8965d0a3d7833345e3ede2b9c3d (diff) | |
download | FreeBSD-src-0cc2091b50692c87aaca94f70e6640ed13044139.zip FreeBSD-src-0cc2091b50692c87aaca94f70e6640ed13044139.tar.gz |
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
Diffstat (limited to 'sbin/fdisk_pc98')
-rw-r--r-- | sbin/fdisk_pc98/fdisk.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/fdisk_pc98/fdisk.c b/sbin/fdisk_pc98/fdisk.c index 109d984..b5d6cc7 100644 --- a/sbin/fdisk_pc98/fdisk.c +++ b/sbin/fdisk_pc98/fdisk.c @@ -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) |