wired: check return of l_settings_load_from_file

Caught by static analysis
This commit is contained in:
James Prestwood 2022-03-18 09:44:20 -07:00 committed by Denis Kenzior
parent 34ba0d7d4a
commit 559a4058cd
1 changed files with 4 additions and 1 deletions

View File

@ -133,7 +133,10 @@ struct l_settings *network_lookup_security(const char *network)
l_debug("Loading %s", path);
conf = l_settings_new();
l_settings_load_from_file(conf, path);
if (!l_settings_load_from_file(conf, path)) {
l_settings_free(conf);
conf = NULL;
}
l_free(path);