Call gctl_free() to free resource allocated with gctl_get_handle().
PR: bin/84664 Submitted by: Daan Vreeken <Danovitsch at Vitsch dot net> MFC after: 3 days
This commit is contained in:
parent
387d535430
commit
d63612b470
@ -761,9 +761,12 @@ write_disk(off_t sector, void *buf)
|
|||||||
gctl_ro_param(grq, "geom", -1, q);
|
gctl_ro_param(grq, "geom", -1, q);
|
||||||
gctl_ro_param(grq, "data", secsize, buf);
|
gctl_ro_param(grq, "data", secsize, buf);
|
||||||
q = gctl_issue(grq);
|
q = gctl_issue(grq);
|
||||||
if (q == NULL)
|
if (q == NULL) {
|
||||||
|
gctl_free(grq);
|
||||||
return(0);
|
return(0);
|
||||||
|
}
|
||||||
warnx("%s", q);
|
warnx("%s", q);
|
||||||
|
gctl_free(grq);
|
||||||
|
|
||||||
error = pwrite(fd, buf, secsize, (sector * 512));
|
error = pwrite(fd, buf, secsize, (sector * 512));
|
||||||
if (error == secsize)
|
if (error == secsize)
|
||||||
|
Loading…
Reference in New Issue
Block a user