summaryrefslogtreecommitdiffstats
path: root/scripts/mod/symsearch.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/mod/symsearch.c')
-rw-r--r--scripts/mod/symsearch.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/mod/symsearch.c b/scripts/mod/symsearch.c
index aa4ed51f9960..b9737b92f7f8 100644
--- a/scripts/mod/symsearch.c
+++ b/scripts/mod/symsearch.c
@@ -4,7 +4,7 @@
* Helper functions for finding the symbol in an ELF which is "nearest"
* to a given address.
*/
-
+#include <xalloc.h>
#include "modpost.h"
struct syminfo {
@@ -125,8 +125,8 @@ void symsearch_init(struct elf_info *elf)
{
unsigned int table_size = symbol_count(elf);
- elf->symsearch = NOFAIL(malloc(sizeof(struct symsearch) +
- sizeof(struct syminfo) * table_size));
+ elf->symsearch = xmalloc(sizeof(struct symsearch) +
+ sizeof(struct syminfo) * table_size);
elf->symsearch->table_size = table_size;
symsearch_populate(elf, elf->symsearch->table, table_size);