ovs: fix leaks

Fixes: 1eeca3c606 ('core/ovs: track external-ids for cached ovsdb objects')
This commit is contained in:
Beniamino Galvani
2020-12-14 18:31:18 +01:00
parent a60ea8af7d
commit ec7d8ddb29

View File

@@ -1770,7 +1770,7 @@ ovsdb_got_update(NMOvsdb *self, json_t *msg)
nm_assert(nm_streq0(ovs_port->name, name));
changed |= nm_utils_strdup_reset(&ovs_port->name, name);
changed |= nm_utils_strdup_reset(&ovs_port->connection_uuid, g_strdup(connection_uuid));
changed |= nm_utils_strdup_reset(&ovs_port->connection_uuid, connection_uuid);
if (nm_strv_ptrarray_cmp(ovs_port->interfaces, interfaces) != 0) {
NM_SWAP(&ovs_port->interfaces, &interfaces);
changed = TRUE;
@@ -1876,7 +1876,7 @@ ovsdb_got_update(NMOvsdb *self, json_t *msg)
changed = nm_utils_strdup_reset(&ovs_bridge->name, name);
changed =
nm_utils_strdup_reset(&ovs_bridge->connection_uuid, g_strdup(connection_uuid));
nm_utils_strdup_reset(&ovs_bridge->connection_uuid, connection_uuid);
if (nm_strv_ptrarray_cmp(ovs_bridge->ports, ports) != 0) {
NM_SWAP(&ovs_bridge->ports, &ports);
changed = TRUE;