summaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/symbol.c
diff options
context:
space:
mode:
authorMasahiro Yamada2018-02-08 17:19:07 +0100
committerMasahiro Yamada2018-02-10 03:26:04 +0100
commitd717f24d8c68081caae2374cf5ea6c4e62c490fc (patch)
tree325008cf6d2fea2dfa15e4d49ae4d4d79fb1ff2b /scripts/kconfig/symbol.c
parentkconfig: send error messages to stderr (diff)
downloadkernel-qcow2-linux-d717f24d8c68081caae2374cf5ea6c4e62c490fc.tar.gz
kernel-qcow2-linux-d717f24d8c68081caae2374cf5ea6c4e62c490fc.tar.xz
kernel-qcow2-linux-d717f24d8c68081caae2374cf5ea6c4e62c490fc.zip
kconfig: add xrealloc() helper
We already have xmalloc(), xcalloc(). Add xrealloc() as well to save tedious error handling. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/kconfig/symbol.c')
-rw-r--r--scripts/kconfig/symbol.c2
1 files changed, 1 insertions, 1 deletions
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);