Loading scripts/kconfig/confdata.c +1 −1 Original line number Diff line number Diff line Loading @@ -178,7 +178,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) case S_HEX: done: if (sym_string_valid(sym, p)) { sym->def[def].val = strdup(p); sym->def[def].val = xstrdup(p); sym->flags |= def_flags; } else { if (def != S_DEF_AUTO) Loading scripts/kconfig/kxgettext.c +1 −1 Original line number Diff line number Diff line Loading @@ -101,7 +101,7 @@ static struct message *message__new(const char *msg, char *option, if (self->files == NULL) goto out_fail; self->msg = strdup(msg); self->msg = xstrdup(msg); if (self->msg == NULL) goto out_fail_msg; Loading scripts/kconfig/lkc.h +1 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,7 @@ int file_write_dep(const char *name); void *xmalloc(size_t size); void *xcalloc(size_t nmemb, size_t size); void *xrealloc(void *p, size_t size); char *xstrdup(const char *s); struct gstr { size_t len; Loading scripts/kconfig/symbol.c +2 −2 Original line number Diff line number Diff line Loading @@ -183,7 +183,7 @@ static void sym_validate_range(struct symbol *sym) sprintf(str, "%lld", val2); else sprintf(str, "0x%llx", val2); sym->curr.val = strdup(str); sym->curr.val = xstrdup(str); } static void sym_set_changed(struct symbol *sym) Loading Loading @@ -849,7 +849,7 @@ struct symbol *sym_lookup(const char *name, int flags) : !(symbol->flags & (SYMBOL_CONST|SYMBOL_CHOICE)))) return symbol; } new_name = strdup(name); new_name = xstrdup(name); } else { new_name = NULL; hash = 0; Loading scripts/kconfig/util.c +11 −0 Original line number Diff line number Diff line Loading @@ -154,3 +154,14 @@ void *xrealloc(void *p, size_t size) fprintf(stderr, "Out of memory.\n"); exit(1); } char *xstrdup(const char *s) { char *p; p = strdup(s); if (p) return p; fprintf(stderr, "Out of memory.\n"); exit(1); } Loading
scripts/kconfig/confdata.c +1 −1 Original line number Diff line number Diff line Loading @@ -178,7 +178,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) case S_HEX: done: if (sym_string_valid(sym, p)) { sym->def[def].val = strdup(p); sym->def[def].val = xstrdup(p); sym->flags |= def_flags; } else { if (def != S_DEF_AUTO) Loading
scripts/kconfig/kxgettext.c +1 −1 Original line number Diff line number Diff line Loading @@ -101,7 +101,7 @@ static struct message *message__new(const char *msg, char *option, if (self->files == NULL) goto out_fail; self->msg = strdup(msg); self->msg = xstrdup(msg); if (self->msg == NULL) goto out_fail_msg; Loading
scripts/kconfig/lkc.h +1 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,7 @@ int file_write_dep(const char *name); void *xmalloc(size_t size); void *xcalloc(size_t nmemb, size_t size); void *xrealloc(void *p, size_t size); char *xstrdup(const char *s); struct gstr { size_t len; Loading
scripts/kconfig/symbol.c +2 −2 Original line number Diff line number Diff line Loading @@ -183,7 +183,7 @@ static void sym_validate_range(struct symbol *sym) sprintf(str, "%lld", val2); else sprintf(str, "0x%llx", val2); sym->curr.val = strdup(str); sym->curr.val = xstrdup(str); } static void sym_set_changed(struct symbol *sym) Loading Loading @@ -849,7 +849,7 @@ struct symbol *sym_lookup(const char *name, int flags) : !(symbol->flags & (SYMBOL_CONST|SYMBOL_CHOICE)))) return symbol; } new_name = strdup(name); new_name = xstrdup(name); } else { new_name = NULL; hash = 0; Loading
scripts/kconfig/util.c +11 −0 Original line number Diff line number Diff line Loading @@ -154,3 +154,14 @@ void *xrealloc(void *p, size_t size) fprintf(stderr, "Out of memory.\n"); exit(1); } char *xstrdup(const char *s) { char *p; p = strdup(s); if (p) return p; fprintf(stderr, "Out of memory.\n"); exit(1); }