config: use E_FREE/eina_stringshare_replace on stale config
free() on memory returned by e_config_domain_load mixes allocators on the stringshare member. Use eina_stringshare_replace to drop the stringshared field and E_FREE for the struct. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
92d4fbc5ff
commit
b03d10b164
1 changed files with 2 additions and 3 deletions
|
|
@ -30,9 +30,8 @@ e_iwd_config_load(void)
|
|||
/* Missing or out-of-date — start fresh with defaults. */
|
||||
if (e_iwd_config)
|
||||
{
|
||||
if (e_iwd_config->preferred_adapter)
|
||||
eina_stringshare_del(e_iwd_config->preferred_adapter);
|
||||
free(e_iwd_config);
|
||||
eina_stringshare_replace(&e_iwd_config->preferred_adapter, NULL);
|
||||
E_FREE(e_iwd_config);
|
||||
}
|
||||
e_iwd_config = E_NEW(E_Iwd_Config, 1);
|
||||
e_iwd_config->version = CONFIG_VERSION;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue