diff options
author | Brian Gix <brian.gix@intel.com> | 2020-05-15 18:22:02 -0700 |
---|---|---|
committer | Brian Gix <brian.gix@intel.com> | 2020-05-15 18:24:18 -0700 |
commit | cc0719ceae2d048e50832cea0890cff1da3d2b52 (patch) | |
tree | 06e52d9c08c27bf9b2f594efa411371b1acdf5fb /mesh/mesh.c | |
parent | a51871bd73cfd58e71d5eb179aad06528ed7256a (diff) | |
download | bluez-cc0719ceae2d048e50832cea0890cff1da3d2b52.tar.gz |
mesh: Fix valgrind memory leaks
These memory leaks are ones that will compound over time with node
creation and deletion.
Diffstat (limited to 'mesh/mesh.c')
-rw-r--r-- | mesh/mesh.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mesh/mesh.c b/mesh/mesh.c index 890a3aa8f..23ff9c2a8 100644 --- a/mesh/mesh.c +++ b/mesh/mesh.c @@ -209,7 +209,7 @@ static void parse_settings(const char *mesh_conf_fname) settings = l_settings_new(); if (!l_settings_load_from_file(settings, mesh_conf_fname)) - return; + goto done; str = l_settings_get_string(settings, "General", "Beacon"); if (str) { @@ -242,6 +242,9 @@ static void parse_settings(const char *mesh_conf_fname) if (l_settings_get_uint(settings, "General", "ProvTimeout", &value)) mesh.prov_timeout = value; + +done: + l_settings_free(settings); } bool mesh_init(const char *config_dir, const char *mesh_conf_fname, |