diff --git a/src/lib/elementary/efl_config_global.eo b/src/lib/elementary/efl_config_global.eo index 621cc70cd6..83edbeefe1 100644 --- a/src/lib/elementary/efl_config_global.eo +++ b/src/lib/elementary/efl_config_global.eo @@ -66,7 +66,7 @@ class Efl.Config.Global (Efl.Object, Efl.Config) is_user: bool; [[$true to lookup for a user profile or $false for a system one.]] } - return: own(stringshare); [[Directory of the profile]] + return: own(string); [[Directory of the profile, free after use.]] } profile_derived_add @protected { [[Add a new profile of the given name to be derived from the current diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c index a931b1d9d6..1961983d28 100644 --- a/src/lib/elementary/elm_config.c +++ b/src/lib/elementary/elm_config.c @@ -937,6 +937,7 @@ _elm_config_profile_dir_get(const char *prof, _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/%s", prof); + // See elm_config_profile_dir_free: always use strdup+free if (ecore_file_is_dir(buf)) return strdup(buf); @@ -945,6 +946,7 @@ _elm_config_profile_dir_get(const char *prof, not_user: snprintf(buf, sizeof(buf), "%s/config/%s", _elm_data_dir, prof); + // See elm_config_profile_dir_free: always use strdup+free if (ecore_file_is_dir(buf)) return strdup(buf); @@ -2793,6 +2795,7 @@ elm_config_profile_dir_get(const char *profile, EAPI void elm_config_profile_dir_free(const char *p_dir) { + // Don't change this: EO relies on free() to be used. free((void *)p_dir); }