mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 07:00:09 +01:00
core/ovs: avoid possible crash in _add_interface()
This commit is contained in:
parent
5d5b35285e
commit
8d78f8effb
1 changed files with 2 additions and 2 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue