In Write_Disk(), fix the non-error case where we returned to the

caller without closing the disk device and freeing allocated
memory. Not closing the disk device prevents GEOM from retasting
after spoiling.

Pointy hat: marcel
This commit is contained in:
Marcel Moolenaar 2004-01-30 20:52:54 +00:00
parent 05d9236acf
commit b60c2339a9

View File

@ -412,10 +412,6 @@ Write_Disk(const struct disk *disk)
* Update and write the in-memory copy of the GPT.
*/
error = update_gpt(fd, disk, hdr, tbl);
if (error)
goto bail;
return (0);
bail:
close(fd);