diff options
Diffstat (limited to 'bfd/elf32-nds32.c')
-rw-r--r-- | bfd/elf32-nds32.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elf32-nds32.c b/bfd/elf32-nds32.c index 5fffbf2..60cd51e 100644 --- a/bfd/elf32-nds32.c +++ b/bfd/elf32-nds32.c @@ -2300,7 +2300,7 @@ nds32_insertion_sort (void *base, size_t nmemb, size_t size, { char *ptr = (char *) base; int i, j; - char *tmp = alloca (size); + char *tmp = xmalloc (size); /* If i is less than j, i is inserted before j. @@ -2324,6 +2324,7 @@ nds32_insertion_sort (void *base, size_t nmemb, size_t size, memmove (ptr + (j + 1) * size, ptr + j * size, (i - j) * size); memcpy (ptr + j * size, tmp, size); } + free (tmp); } /* Sort relocation by r_offset. |