X-Git-Url: https://jxself.org/git/?p=carl9170fw.git;a=blobdiff_plain;f=config%2Fsymbol.c;h=c9123ed2b791ad2de18450485f11ed15984cf448;hp=35e0937aa6a6fd3b47f15974f6df121c41c55488;hb=2f1132cbcec40e431991cda7ff3744455b46c3df;hpb=8208d00a70bdf17ba50edea6cf1a79a3fd93744a diff --git a/config/symbol.c b/config/symbol.c index 35e0937..c9123ed 100644 --- a/config/symbol.c +++ b/config/symbol.c @@ -77,7 +77,7 @@ const char *sym_type_name(enum symbol_type type) { switch (type) { case S_BOOLEAN: - return "boolean"; + return "bool"; case S_TRISTATE: return "tristate"; case S_INT: @@ -907,6 +907,10 @@ const char *sym_expand_string_value(const char *in) char *res; size_t reslen; + /* + * Note: 'in' might come from a token that's about to be + * freed, so make sure to always allocate a new string + */ reslen = strlen(in) + 1; res = xmalloc(reslen); res[0] = '\0';