From d717f24d8c68081caae2374cf5ea6c4e62c490fc Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 9 Feb 2018 01:19:07 +0900 Subject: kconfig: add xrealloc() helper We already have xmalloc(), xcalloc(). Add xrealloc() as well to save tedious error handling. Signed-off-by: Masahiro Yamada --- scripts/kconfig/symbol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/kconfig/symbol.c') diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c index c4409ee7fee2..60a76f958f33 100644 --- a/scripts/kconfig/symbol.c +++ b/scripts/kconfig/symbol.c @@ -936,7 +936,7 @@ const char *sym_expand_string_value(const char *in) newlen = strlen(res) + strlen(symval) + strlen(src) + 1; if (newlen > reslen) { reslen = newlen; - res = realloc(res, reslen); + res = xrealloc(res, reslen); } strcat(res, symval); -- cgit v1.2.3