diff options
author | 2014-03-28 15:32:15 +0000 | |
---|---|---|
committer | 2014-03-28 15:32:15 +0000 | |
commit | f963d0bcd73fba69112e529071ef7507d29c7584 (patch) | |
tree | 9cfb517f49d7e7bef2299e3003b9d1e85794b914 /src/mess/machine/cbm_snqk.c | |
parent | 513738066d94b89185222f997fd0c715acc72d5f (diff) |
replaced some more malloc/free usage with global_alloc_array/global_free_array (nw)
Diffstat (limited to 'src/mess/machine/cbm_snqk.c')
-rw-r--r-- | src/mess/machine/cbm_snqk.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mess/machine/cbm_snqk.c b/src/mess/machine/cbm_snqk.c index 116d5b2f3d0..816911110cd 100644 --- a/src/mess/machine/cbm_snqk.c +++ b/src/mess/machine/cbm_snqk.c @@ -69,7 +69,7 @@ int general_cbm_loadsnap( device_image_interface &image, const char *file_type, address = 2049; snapshot_size -= 2; - data = (UINT8*)malloc(snapshot_size); + data = global_alloc_array(UINT8, snapshot_size); if (!data) goto error; @@ -81,12 +81,12 @@ int general_cbm_loadsnap( device_image_interface &image, const char *file_type, space.write_byte(address + i + offset, data[i]); cbm_sethiaddress(space, address + snapshot_size); - free(data); + global_free_array(data); return IMAGE_INIT_PASS; error: if (data) - free(data); + global_free_array(data); return IMAGE_INIT_FAIL; } |