From 8f46425b11188641a8ac6e53614405212465b464 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 15 Apr 2020 22:28:00 +0200 Subject: 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 --- shared/nm-keyfile/nm-keyfile-utils.c | 1 - 1 file changed, 1 deletion(-) (limited to 'shared') 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) \ -- cgit v1.2.1