Skip to content

Commit 3baf584

Browse files
authored
Merge pull request #182 from ChinYikMing/master
Call appropriate release function
2 parents 687491c + d21591f commit 3baf584

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/io.c

+4
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ memory_t *memory_new()
4040

4141
void memory_delete(memory_t *mem)
4242
{
43+
#if defined(USE_MMAP)
4344
munmap(mem->mem_base, MEM_SIZE);
45+
#else
46+
free(mem->mem_base);
47+
#endif
4448
}
4549

4650
void memory_read(memory_t *mem, uint8_t *dst, uint32_t addr, uint32_t size)

0 commit comments

Comments
 (0)