3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 04:32:37 +01:00

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

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);