diff options
author | Chandramouli Narayanan <chandramouli.narayanan@intel.com> | 2012-02-24 13:19:56 +0000 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2012-02-24 13:19:56 +0000 |
commit | 5b138643e73cd2ffc7edab1aea197c200c46f9d4 (patch) | |
tree | 98c5945280bff4fcd0dbe30fd3ffa31d34949acb | |
parent | 6255b08f00272d9da7ef946a6819dc07aaeda2e0 (diff) | |
download | syslinux-5b138643e73cd2ffc7edab1aea197c200c46f9d4.tar.gz syslinux-5b138643e73cd2ffc7edab1aea197c200c46f9d4.tar.xz syslinux-5b138643e73cd2ffc7edab1aea197c200c46f9d4.zip |
core, efi: Return new pointer in realloc()
Instead of returning the pointer to the newly allocated memory,
relloc() currently returns garbage. Return the correct pointer.
Signed-off-by: Chandramouli Narayanan <chandramouli.narayanan@intel.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-rw-r--r-- | core/mem/malloc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/mem/malloc.c b/core/mem/malloc.c index dcb5a942..732ad677 100644 --- a/core/mem/malloc.c +++ b/core/mem/malloc.c @@ -117,6 +117,7 @@ void *realloc(void *ptr, size_t size) newptr = AllocatePool(size); memcpy(newptr, ptr, size); FreePool(ptr); + return newptr; #else if (!ptr) return malloc(size); |