HomePhabricator

elm_config: Free data returned from eet_read

Authored by devilhorns on Jan 16 2019, 8:07 AM.

Description

elm_config: Free data returned from eet_read

Summary:
This patch fixes a memory leak in _elm_config_profile_name_get() where
the data returned from eet_read is not being free'd, causing valgrind
to spit out:

==11610== 9 bytes in 1 blocks are definitely lost in loss record 16 of
572
==11610==    at 0x483777F: malloc (vg_replace_malloc.c:299)
==11610==    by 0x4D9DE5B: eina_strbuf_common_string_steal
(eina_strbuf_common.c:828)
==11610==    by 0x4D5BC31: eina_binbuf_string_steal
(eina_binbuf_template_c.x:187)
==11610==    by 0x58646A1: eet_read_cipher (eet_lib.c:1991)
==11610==    by 0x5864775: eet_read (eet_lib.c:2022)
==11610==    by 0x49CD4D2: _elm_config_profile_name_get
(elm_config.c:2207)
==11610==    by 0x49CD5F8: _elm_config_profile_save (elm_config.c:2237)
==11610==    by 0x49D2F6E: _elm_config_sub_init (elm_config.c:4467)
==11610==    by 0x4AC0B7D: elm_quicklaunch_sub_init (elm_main.c:840)
==11610==    by 0x4ABFE3A: elm_init (elm_main.c:409)
==11610==    by 0x138143: main (test.c:1379)

@fix

Reviewers: raster, cedric, ManMower

Reviewed By: raster

Subscribers: reviewers, committers

Tags: efl

Differential Revision: https://phab.enlightenment.org/D7646

Details

Committed
devilhornsJan 16 2019, 8:07 AM
Reviewer
raster
Differential Revision
D7646: elm_config: Free data returned from eet_read
Parents
rEFL5a11fd858768: eolian_gen: void out keys depending on how they are setted
Branches
Unknown
Tags
Unknown