diff options
author | Thomas Haller <thaller@redhat.com> | 2020-11-05 21:23:11 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-11-09 17:53:17 +0100 |
commit | 8d78f8effb67a6c5dca93dbbaa45efd4a0196ecb (patch) | |
tree | 429ce466bddd1f17f1e10ceb084da4b0ddd6e4fb | |
parent | 5d5b35285ec730f5f48d3fde7dc8720d628b345c (diff) | |
download | NetworkManager-8d78f8effb67a6c5dca93dbbaa45efd4a0196ecb.tar.gz |
core/ovs: avoid possible crash in _add_interface()
-rw-r--r-- | src/devices/ovs/nm-ovsdb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/devices/ovs/nm-ovsdb.c b/src/devices/ovs/nm-ovsdb.c index 9b50b1aa74..b1d09ce5b8 100644 --- a/src/devices/ovs/nm-ovsdb.c +++ b/src/devices/ovs/nm-ovsdb.c @@ -1313,7 +1313,7 @@ ovsdb_got_update(NMOvsdb *self, json_t *msg) if (old) { ovs_port = g_hash_table_lookup(priv->ports, key); - if (!new || !nm_streq0(ovs_port->name, name)) { + if (!new || (ovs_port && !nm_streq0(ovs_port->name, name))) { old = FALSE; _LOGT("removed a port: %s%s%s", ovs_port->name, @@ -1378,7 +1378,7 @@ ovsdb_got_update(NMOvsdb *self, json_t *msg) if (old) { ovs_bridge = g_hash_table_lookup(priv->bridges, key); - if (!new || !nm_streq0(ovs_bridge->name, name)) { + if (!new || (ovs_bridge && !nm_streq0(ovs_bridge->name, name))) { old = FALSE; _LOGT("removed a bridge: %s%s%s", ovs_bridge->name, |