Commit 272f1910 authored by Beniamino Galvani's avatar Beniamino Galvani

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: ce0e898f ('libnm: refactor caching of D-Bus objects in NMClient')
parent 966e3341
...@@ -671,7 +671,8 @@ NML_IS_DBUS_OBJECT (NMLDBusObject *dbobj) ...@@ -671,7 +671,8 @@ NML_IS_DBUS_OBJECT (NMLDBusObject *dbobj)
nm_assert ( !dbobj nm_assert ( !dbobj
|| ( NM_IS_REF_STRING (dbobj->dbus_path) || ( NM_IS_REF_STRING (dbobj->dbus_path)
&& dbobj->ref_count > 0)); && dbobj->ref_count > 0));
nm_assert ( !dbobj->nmobj nm_assert ( !dbobj
|| !dbobj->nmobj
|| NM_IS_OBJECT (dbobj->nmobj) || NM_IS_OBJECT (dbobj->nmobj)
|| NM_IS_CLIENT (dbobj->nmobj)); || NM_IS_CLIENT (dbobj->nmobj));
return !!dbobj; return !!dbobj;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment