mirror of
https://github.com/simh/simh.git
synced 2026-02-11 18:46:08 +00:00
Fix handle leak if a memory allocation error occurred during a VHD create with Copy
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user