aboutsummaryrefslogtreecommitdiffstats
path: root/com32/modules
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2012-04-03 12:12:50 +0100
committerMatt Fleming <matt.fleming@intel.com>2012-04-17 10:58:35 +0100
commitb428530fead73c7c15d9dce78729b7bf94658a7d (patch)
treedc5478964a4f76ea1a7e2ecd1bab6174c1151b89 /com32/modules
parent458caa4189dae6ca6b56cf7ee30d38cccd13e1b5 (diff)
downloadsyslinux-b428530fead73c7c15d9dce78729b7bf94658a7d.tar.gz
syslinux-b428530fead73c7c15d9dce78729b7bf94658a7d.tar.xz
syslinux-b428530fead73c7c15d9dce78729b7bf94658a7d.zip
meminfo: If we allocate with lmalloc() we should free with lfree()
Since commit 74518b8b691c ("elflink: Make ELF the default object format") we've been using lmalloc() with free() instead of lfree(). This bug was pointed out by the following build warnings, meminfo.c: In function ‘dump_e820’: meminfo.c:93:5: warning: implicit declaration of function ‘free’ meminfo.c:93:5: warning: incompatible implicit declaration of built-in function ‘free’ vesainfo.c: In function ‘print_modes’: vesainfo.c:82:2: warning: implicit declaration of function ‘free’ vesainfo.c:82:2: warning: incompatible implicit declaration of built-in function ‘free’ Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'com32/modules')
-rw-r--r--com32/modules/meminfo.c8
-rw-r--r--com32/modules/vesainfo.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/com32/modules/meminfo.c b/com32/modules/meminfo.c
index 00d0e14d..a1abc36b 100644
--- a/com32/modules/meminfo.c
+++ b/com32/modules/meminfo.c
@@ -44,9 +44,9 @@ static void dump_e820(void)
uint32_t type;
void *low_ed;
- low_ed = lmalloc(sizeof ed);
- if (!low_ed)
- return;
+ low_ed = lmalloc(sizeof ed);
+ if (!low_ed)
+ return;
memset(&ireg, 0, sizeof ireg);
@@ -90,7 +90,7 @@ static void dump_e820(void)
ireg.ebx.l = oreg.ebx.l;
} while (ireg.ebx.l);
- free(low_ed);
+ lfree(low_ed);
}
static void dump_legacy(void)
diff --git a/com32/modules/vesainfo.c b/com32/modules/vesainfo.c
index 86a43657..382bd14a 100644
--- a/com32/modules/vesainfo.c
+++ b/com32/modules/vesainfo.c
@@ -79,7 +79,7 @@ static void print_modes(void)
}
exit:
- free(vesa);
+ lfree(vesa);
return;
}