Fix handle leak if a memory allocation error occurred during a VHD create with Copy
This commit is contained in:
parent
38c1e1ec2b
commit
ba2070f1f6
1 changed files with 1 additions and 0 deletions
|
@ -892,6 +892,7 @@ if (sim_switches & SWMASK ('C')) { /* create vhd disk & cop
|
||||||
t_seccnt sects = sectors_per_buffer;
|
t_seccnt sects = sectors_per_buffer;
|
||||||
|
|
||||||
if (!copy_buf) {
|
if (!copy_buf) {
|
||||||
|
sim_vhd_disk_close(vhd);
|
||||||
remove (gbuf);
|
remove (gbuf);
|
||||||
return SCPE_MEM;
|
return SCPE_MEM;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue