aboutsummaryrefslogtreecommitdiffstats
path: root/com32/sysdump/memmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'com32/sysdump/memmap.c')
-rw-r--r--com32/sysdump/memmap.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/com32/sysdump/memmap.c b/com32/sysdump/memmap.c
index a85f0925..251107d5 100644
--- a/com32/sysdump/memmap.c
+++ b/com32/sysdump/memmap.c
@@ -19,10 +19,12 @@ struct e820_info {
static void dump_e820(struct backend *be)
{
com32sys_t ireg, oreg;
- struct e820_info *curr = __com32.cs_bounce;
+ struct e820_info *curr;
struct e820_info *buf, *p;
int nentry, nalloc;
+ curr = lmalloc(sizeof *curr);
+
buf = p = NULL;
nentry = nalloc = 0;
memset(&ireg, 0, sizeof ireg);
@@ -56,7 +58,9 @@ static void dump_e820(struct backend *be)
if (nentry)
cpio_writefile(be, "memmap/15e820", buf, nentry*sizeof *buf);
+
free(buf);
+ lfree(curr);
}
void dump_memory_map(struct backend *be)