diff options
author | Thomas Haller <thaller@redhat.com> | 2017-12-12 10:49:09 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-12-12 11:15:38 +0100 |
commit | 62d4dba74bac791c06ba70547f81b78eab5b9dc5 (patch) | |
tree | 620f980ea0ded4a8e3dca9462d19b07a6539d2cd | |
parent | 27e8fffdb833748dfeb6648b8768c4ef48822841 (diff) | |
download | NetworkManager-62d4dba74bac791c06ba70547f81b78eab5b9dc5.tar.gz |
platform: assert() for valid item in nm_platform_link_get_all()
Coverity thinks that item might be NULL, but actually it
cannot. Unclear how to avoid the false positive.
-rw-r--r-- | src/platform/nm-platform.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c index 369effb901..f5775f021c 100644 --- a/src/platform/nm-platform.c +++ b/src/platform/nm-platform.c @@ -667,6 +667,7 @@ skip: /* There is a loop, pop the first (remaining) element from the list. * This can happen for veth pairs where each peer is parent of the other end. */ item = NMP_OBJECT_CAST_LINK (links->pdata[first_idx]); + nm_assert (item); g_hash_table_remove (unseen, GINT_TO_POINTER (item->ifindex)); g_ptr_array_add (result, links->pdata[first_idx]); links->pdata[first_idx] = NULL; |