summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_config.c
diff options
context:
space:
mode:
authorChristopher Michael <devilhorns@comcast.net>2019-01-16 11:07:07 -0500
committerChristopher Michael <cp.michael@samsung.com>2019-01-16 11:07:07 -0500
commitbc43982949645c1b6f80b85943d9f88225619288 (patch)
tree0e6b6aafb6a0ebd67aad10653b29308fbc5ff7ca /src/lib/elementary/elm_config.c
parent5a11fd858768be6243d06b51dea837aa0b9f66e7 (diff)
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
Diffstat (limited to 'src/lib/elementary/elm_config.c')
-rw-r--r--src/lib/elementary/elm_config.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c
index b1b807f966..7d7e85d438 100644
--- a/src/lib/elementary/elm_config.c
+++ b/src/lib/elementary/elm_config.c
@@ -2210,6 +2210,7 @@ _elm_config_profile_name_get()
2210 rst = calloc(1, len+1); 2210 rst = calloc(1, len+1);
2211 memcpy(rst, p, len); 2211 memcpy(rst, p, len);
2212 rst[len] = '\0'; 2212 rst[len] = '\0';
2213 free(p);
2213 } 2214 }
2214 eet_close(ef); 2215 eet_close(ef);
2215 } 2216 }