libnm: check pspec before accessing it in handle_property_changed()

Fixes: 1f8ec6122e

Coverity:
libnm/nm-object.c:926: var_deref_op: Dereferencing null pointer "pspec".
libnm/nm-object.c:924: var_deref_op: Dereferencing null pointer "pspec".
This commit is contained in:
Jiří Klimeš 2014-12-04 17:39:26 +01:00
parent 28599331e3
commit b11416de6a

View file

@ -919,7 +919,7 @@ handle_property_changed (NMObject *self, const char *dbus_name,
g_free (s);
}
if (pi->object_type) {
if (pspec && pi->object_type) {
if (g_variant_is_of_type (value, G_VARIANT_TYPE_OBJECT_PATH))
success = handle_object_property (self, pspec->name, value, pi, synchronously);
else if (g_variant_is_of_type (value, G_VARIANT_TYPE ("ao")))