aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2018-11-12 15:23:58 +0100
committerDaniel Kolesa <d.kolesa@samsung.com>2018-11-12 15:26:01 +0100
commitac46540e93a0a46ba962b3d6ce2a830bde3043f8 (patch)
tree048bb9a9761b4e212be5df1d28e9974a6a332cce
parentmeson - define WORDS_BIGENDIAN if on big endian (diff)
downloadefl-devs/q66/eolian_mstring_freefunc.tar.gz
eolian: use 'free' for owned mstring but not stringdevs/q66/eolian_mstring_freefunc
Summary: Strings are const and if these are meant to be owned then it should define its own special free func. Mstrings are mutable and therefore can be owned and freed using standard free() by default. This fixes some warnings around the EFL caused by empty fallback free funcs created by the eolian generator, and these mutable strings were not being freed and potentially leaked. Reviewers: bu5hm4n, stefan_schmidt Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7261
-rw-r--r--src/lib/eolian/database_validate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/eolian/database_validate.c b/src/lib/eolian/database_validate.c
index 8858818dff..4217ba9431 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -261,7 +261,7 @@ _validate_type(Validate_State *vals, Eolian_Type *tp)
if (!tp->freefunc)
switch (id)
{
- case KW_string:
+ case KW_mstring:
tp->freefunc = eina_stringshare_add(eo_str_free);
break;
case KW_stringshare: