summaryrefslogtreecommitdiff
path: root/src/lib/eolian
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-07-08 16:17:58 +0200
committerDaniel Kolesa <d.kolesa@samsung.com>2019-07-08 16:17:58 +0200
commit3853f75696b1402b7ddae369d3fcce77c4c5cdb1 (patch)
tree40480f43ee9b0faafcabb012f4022b1aa1c8602f /src/lib/eolian
parent5ae9e04e4ded623a682d24d1196e714820094922 (diff)
eolian: fix leak in eolian_state_file_path_parse
Summary: this fixes a trivial leak where a string is leaked at the end of the function. it is not significant, but it still appears in leak detections. Reviewers: q66 Reviewed By: q66 Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9124
Diffstat (limited to 'src/lib/eolian')
-rw-r--r--src/lib/eolian/eolian_database.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/eolian/eolian_database.c b/src/lib/eolian/eolian_database.c
index caa43407a4..7e78a20105 100644
--- a/src/lib/eolian/eolian_database.c
+++ b/src/lib/eolian/eolian_database.c
@@ -1081,6 +1081,7 @@ eolian_state_file_parse(Eolian_State *state, const char *filename)
1081EAPI const Eolian_Unit * 1081EAPI const Eolian_Unit *
1082eolian_state_file_path_parse(Eolian_State *state, const char *filepath) 1082eolian_state_file_path_parse(Eolian_State *state, const char *filepath)
1083{ 1083{
1084 const Eolian_Unit *unit;
1084 if (!state) 1085 if (!state)
1085 return NULL; 1086 return NULL;
1086 1087
@@ -1103,10 +1104,13 @@ eolian_state_file_path_parse(Eolian_State *state, const char *filepath)
1103 1104
1104 if (!eolian_state_directory_add(state, toscan)) 1105 if (!eolian_state_directory_add(state, toscan))
1105 { 1106 {
1107 free(mpath);
1106 eolian_state_log(state, "could not scan directory '%s'", toscan); 1108 eolian_state_log(state, "could not scan directory '%s'", toscan);
1107 return NULL; 1109 return NULL;
1108 } 1110 }
1109 return eolian_state_file_parse(state, fname); 1111 unit = eolian_state_file_parse(state, fname);
1112 free(mpath);
1113 return unit;
1110} 1114}
1111 1115
1112typedef struct _Parse_Data 1116typedef struct _Parse_Data