mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 17:00:08 +01:00
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.
(cherry picked from commit 62d4dba74b)
This commit is contained in:
parent
99eef7a2ea
commit
490911c6fa
1 changed files with 1 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue