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 2004-01-30 20:52:54 +00:00
parent 822c3ce335
commit 9de97de175

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);