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
This commit is contained in:
parent
5ae9e04e4d
commit
3853f75696
|
@ -1081,6 +1081,7 @@ eolian_state_file_parse(Eolian_State *state, const char *filename)
|
|||
EAPI const Eolian_Unit *
|
||||
eolian_state_file_path_parse(Eolian_State *state, const char *filepath)
|
||||
{
|
||||
const Eolian_Unit *unit;
|
||||
if (!state)
|
||||
return NULL;
|
||||
|
||||
|
@ -1103,10 +1104,13 @@ eolian_state_file_path_parse(Eolian_State *state, const char *filepath)
|
|||
|
||||
if (!eolian_state_directory_add(state, toscan))
|
||||
{
|
||||
free(mpath);
|
||||
eolian_state_log(state, "could not scan directory '%s'", toscan);
|
||||
return NULL;
|
||||
}
|
||||
return eolian_state_file_parse(state, fname);
|
||||
unit = eolian_state_file_parse(state, fname);
|
||||
free(mpath);
|
||||
return unit;
|
||||
}
|
||||
|
||||
typedef struct _Parse_Data
|
||||
|
|
Loading…
Reference in New Issue