mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-03-04 22:20:40 +01:00
core: avoid dereferencing NULL in nm_utils_resolve_conf_parse()
Found by coverity. Fixes:8f1ef161f4(cherry picked from commita7087b1f05)
This commit is contained in:
parent
387377d8fc
commit
1bb6b3a79f
1 changed files with 1 additions and 2 deletions
|
|
@ -1960,8 +1960,7 @@ nm_utils_resolve_conf_parse (int addr_family,
|
|||
gsize i_tokens;
|
||||
|
||||
tokens = nm_utils_strsplit_set (s, " \t");
|
||||
nm_assert (tokens);
|
||||
for (i_tokens = 0; tokens[i_tokens]; i_tokens++) {
|
||||
for (i_tokens = 0; tokens && tokens[i_tokens]; i_tokens++) {
|
||||
gs_free char *t = g_strstrip (g_strdup (tokens[i_tokens]));
|
||||
|
||||
if ( _nm_utils_dns_option_validate (t, NULL, NULL,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue