diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2001-03-17 16:15:57 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2001-03-17 16:15:57 +0000 |
commit | 9a5556c0ae50560bc0354d13124a7e93bef9fa3c (patch) | |
tree | fd72a563d81db60c6e597f822c13bf17ac0f923d /mdk-stage1 | |
parent | 346ed7a09da10ef475d93d0270d1a3aa1db34774 (diff) | |
download | drakx-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.c | 5 |
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; |