Fix handle leak if a memory allocation error occurred during a VHD create with Copy

This commit is contained in:
Mark Pizzolato 2013-03-20 07:06:47 -07:00
parent 38c1e1ec2b
commit ba2070f1f6

View file

@ -892,6 +892,7 @@ if (sim_switches & SWMASK ('C')) { /* create vhd disk & cop
t_seccnt sects = sectors_per_buffer;
if (!copy_buf) {
sim_vhd_disk_close(vhd);
remove (gbuf);
return SCPE_MEM;
}