mirror of
https://github.com/jfdelnero/HxCFloppyEmulator.git
synced 2026-07-28 04:06:36 +00:00
memory leak fix.
This commit is contained in:
@@ -217,7 +217,7 @@ int ATR_libLoad_DiskFile(HXCFE_IMGLDR * imgldr_ctx,HXCFE_FLOPPY * floppydisk,cha
|
||||
|
||||
memset(sectorconfig,0,sizeof(HXCFE_SECTCFG)*floppydisk->floppySectorPerTrack);
|
||||
|
||||
trackdata=(unsigned char*)malloc(sectorsize*floppydisk->floppySectorPerTrack);
|
||||
trackdata = (unsigned char*)malloc(sectorsize*floppydisk->floppySectorPerTrack);
|
||||
if( !trackdata )
|
||||
goto alloc_error;
|
||||
|
||||
@@ -278,6 +278,7 @@ int ATR_libLoad_DiskFile(HXCFE_IMGLDR * imgldr_ctx,HXCFE_FLOPPY * floppydisk,cha
|
||||
}
|
||||
}
|
||||
|
||||
free(trackdata);
|
||||
free(sectorconfig);
|
||||
imgldr_ctx->hxcfe->hxc_printf(MSG_INFO_1,"track file successfully loaded and encoded!");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user