mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 04:10:14 +01:00
libnm: fix assertion in NML_IS_DBUS_OBJECT()
Reported by coverity:
>>> CID 210228: Null pointer dereferences (REVERSE_INULL)
>>> Null-checking "dbobj" suggests that it may be null, but it has
already been dereferenced on all paths leading to the check.
Fixes: ce0e898fb4 ('libnm: refactor caching of D-Bus objects in NMClient')
(cherry picked from commit 272f19108b)
This commit is contained in:
parent
f8a74684f4
commit
144e7e40f0
1 changed files with 2 additions and 1 deletions
|
|
@ -671,7 +671,8 @@ NML_IS_DBUS_OBJECT (NMLDBusObject *dbobj)
|
|||
nm_assert ( !dbobj
|
||||
|| ( NM_IS_REF_STRING (dbobj->dbus_path)
|
||||
&& dbobj->ref_count > 0));
|
||||
nm_assert ( !dbobj->nmobj
|
||||
nm_assert ( !dbobj
|
||||
|| !dbobj->nmobj
|
||||
|| NM_IS_OBJECT (dbobj->nmobj)
|
||||
|| NM_IS_CLIENT (dbobj->nmobj));
|
||||
return !!dbobj;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue