From d815c26f9c250e1745fc65e47bbd386016c34c3c Mon Sep 17 00:00:00 2001 From: Daniel Kolesa Date: Thu, 6 Feb 2020 14:43:38 +0100 Subject: [PATCH] eolian: fix missing stringshare_ref This was properly applied to all cases except this one where it was overlooked/forgotten. That resulted in the @c_name() feature with enums being broken because of bad memory. Fixes T8596. --- src/lib/eolian/eo_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c index 730669b295..e6d80dd611 100644 --- a/src/lib/eolian/eo_parser.c +++ b/src/lib/eolian/eo_parser.c @@ -564,7 +564,7 @@ parse_enum(Eo_Lexer *ls, const char *name, Eina_Bool is_extern, def->base.name = name; if (cname) { - def->base.c_name = cname; + def->base.c_name = eina_stringshare_ref(cname); eo_lexer_dtor_pop(ls); } else