···88#include <errno.h>99#include <string.h>1010#include <limits.h>1111+1212+#include <xalloc.h>1113#include "modpost.h"12141315/*···307305 const char *base;308306 int dirlen, ret = 0, check_files = 0;309307310310- cmd = NOFAIL(malloc(strlen(objfile) + sizeof("..cmd")));308308+ cmd = xmalloc(strlen(objfile) + sizeof("..cmd"));311309312310 base = strrchr(objfile, '/');313311 if (base) {···318316 dirlen = 0;319317 sprintf(cmd, ".%s.cmd", objfile);320318 }321321- dir = NOFAIL(malloc(dirlen + 1));319319+ dir = xmalloc(dirlen + 1);322320 strncpy(dir, objfile, dirlen);323321 dir[dirlen] = '\0';324322
+3-3
scripts/mod/symsearch.c
···44 * Helper functions for finding the symbol in an ELF which is "nearest"55 * to a given address.66 */77-77+#include <xalloc.h>88#include "modpost.h"991010struct syminfo {···125125{126126 unsigned int table_size = symbol_count(elf);127127128128- elf->symsearch = NOFAIL(malloc(sizeof(struct symsearch) +129129- sizeof(struct syminfo) * table_size));128128+ elf->symsearch = xmalloc(sizeof(struct symsearch) +129129+ sizeof(struct syminfo) * table_size);130130 elf->symsearch->table_size = table_size;131131132132 symsearch_populate(elf, elf->symsearch->table, table_size);