summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2001-03-17 16:15:57 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2001-03-17 16:15:57 +0000
commit9a5556c0ae50560bc0354d13124a7e93bef9fa3c (patch)
treefd72a563d81db60c6e597f822c13bf17ac0f923d /mdk-stage1
parent346ed7a09da10ef475d93d0270d1a3aa1db34774 (diff)
downloaddrakx-9a5556c0ae50560bc0354d13124a7e93bef9fa3c.tar
drakx-9a5556c0ae50560bc0354d13124a7e93bef9fa3c.tar.gz
drakx-9a5556c0ae50560bc0354d13124a7e93bef9fa3c.tar.bz2
drakx-9a5556c0ae50560bc0354d13124a7e93bef9fa3c.tar.xz
drakx-9a5556c0ae50560bc0354d13124a7e93bef9fa3c.zip
fix insmod calling realloc(0,0) to work with dietlibc
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/insmod-busybox/utility.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mdk-stage1/insmod-busybox/utility.c b/mdk-stage1/insmod-busybox/utility.c
index b9a115c72..ffd323347 100644
--- a/mdk-stage1/insmod-busybox/utility.c
+++ b/mdk-stage1/insmod-busybox/utility.c
@@ -1422,7 +1422,10 @@ extern void *xmalloc(size_t size)
extern void *xrealloc(void *old, size_t size)
{
- void *ptr = realloc(old, size);
+ void *ptr;
+ if (!size)
+ size = 1;
+ ptr = realloc(old, size);
if (!ptr)
fatalError("memory_exhausted");
return ptr;