diff options
author | Patrick Georgi <patrick@coreboot.org> | 2024-01-30 23:37:11 +0100 |
---|---|---|
committer | Patrick Georgi <patrick@coreboot.org> | 2024-02-05 06:29:11 +0000 |
commit | 3e397ddacbaa61d766fde21ddbea30493c6df9b8 (patch) | |
tree | 6158cc4c08f6ee0e91fcbacd24d2417eefc54894 /util/kconfig/symbol.c | |
parent | cc2ab495256b8fffe4820c768fe1a20be1cd18a7 (diff) |
util/kconfig: Uprev to Linux 6.7's kconfig
Just a memory leak fix in Linux 6.7.
Change-Id: I1ff302dafa01e78429a30ff18e21ffe0b45ce46e
Signed-off-by: Patrick Georgi <patrick@coreboot.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80263
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'util/kconfig/symbol.c')
-rw-r--r-- | util/kconfig/symbol.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/util/kconfig/symbol.c b/util/kconfig/symbol.c index a50f13121c..34fc66e075 100644 --- a/util/kconfig/symbol.c +++ b/util/kconfig/symbol.c @@ -123,9 +123,9 @@ static long long sym_get_range_val(struct symbol *sym, int base) static void sym_validate_range(struct symbol *sym) { struct property *prop; + struct symbol *range_sym; int base; long long val, val2; - char str[64]; switch (sym->type) { case S_INT: @@ -141,17 +141,15 @@ static void sym_validate_range(struct symbol *sym) if (!prop) return; val = strtoll(sym->curr.val, NULL, base); - val2 = sym_get_range_val(prop->expr->left.sym, base); + range_sym = prop->expr->left.sym; + val2 = sym_get_range_val(range_sym, base); if (val >= val2) { - val2 = sym_get_range_val(prop->expr->right.sym, base); + range_sym = prop->expr->right.sym; + val2 = sym_get_range_val(range_sym, base); if (val <= val2) return; } - if (sym->type == S_INT) - sprintf(str, "%lld", val2); - else - sprintf(str, "0x%llx", val2); - sym->curr.val = xstrdup(str); + sym->curr.val = range_sym->curr.val; } static void sym_set_changed(struct symbol *sym) |