Page MenuHomePhabricator

elm_config: Free data returned from eet_read
ClosedPublic

Authored by devilhorns on Jan 16 2019, 7:59 AM.

Details

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

Diff Detail

Repository
rEFL core/efl
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 8850
Build 7776: arc lint + arc unit
devilhorns created this revision.Jan 16 2019, 7:59 AM
devilhorns requested review of this revision.Jan 16 2019, 7:59 AM
raster edited the summary of this revision. (Show Details)Jan 16 2019, 8:02 AM
raster accepted this revision.Jan 16 2019, 8:05 AM

ACK - go land it.

This revision is now accepted and ready to land.Jan 16 2019, 8:05 AM
devilhorns closed this revision.Jan 16 2019, 8:06 AM
raster edited the summary of this revision. (Show Details)Jan 16 2019, 8:09 AM