diff options
author | Thomas Haller <thaller@redhat.com> | 2020-04-15 22:28:00 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-04-15 22:37:24 +0200 |
commit | 8f46425b11188641a8ac6e53614405212465b464 (patch) | |
tree | e255e6584ee3f249aa83528c017801e5c59c22f2 /shared | |
parent | 216e97b7fa7b241c577bced7cd6b48dfa89595c1 (diff) | |
download | NetworkManager-8f46425b11188641a8ac6e53614405212465b464.tar.gz |
keyfile: avoid assertion failure in nm_keyfile_plugin_kf_get_{string,integer}_list()
g_key_file_get_integer_list() can return %NULL without setting an error.
That is the case if the key is set to an empty value.
For X sake, this API. Read the documentation and figure out whether
the function can return %NULL without reporting an error.
Anyway, avoid the assertion failure.
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/412
Diffstat (limited to 'shared')
-rw-r--r-- | shared/nm-keyfile/nm-keyfile-utils.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/shared/nm-keyfile/nm-keyfile-utils.c b/shared/nm-keyfile/nm-keyfile-utils.c index e18db20d64..041b5eab11 100644 --- a/shared/nm-keyfile/nm-keyfile-utils.c +++ b/shared/nm-keyfile/nm-keyfile-utils.c @@ -124,7 +124,6 @@ nm_keyfile_plugin_kf_get_##stype##_list (GKeyFile *kf, \ list = g_key_file_get_##stype##_list (kf, alias, key, &l, &local); \ } \ } \ - nm_assert ((!local) != (!list)); \ if (local) \ g_propagate_error (error, local); \ if (!list) \ |