mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-04 20:20:17 +01:00
core/ovs: fix leak of "NMOvsdbPrivate.db_uuid
Also, never update the value to %NULL. If the current message does not contain a UUID, keep the previous one. Fixes:830a5a14cb('device: add support for OpenVSwitch devices') (cherry picked from commit609b08e2eb)
This commit is contained in:
parent
b9f802122a
commit
0464c36a02
1 changed files with 6 additions and 2 deletions
|
|
@ -1175,8 +1175,12 @@ ovsdb_got_update(NMOvsdb *self, json_t *msg)
|
|||
}
|
||||
|
||||
if (ovs) {
|
||||
iter = json_object_iter(ovs);
|
||||
priv->db_uuid = iter ? g_strdup(json_object_iter_key(iter)) : NULL;
|
||||
const char *s;
|
||||
|
||||
iter = json_object_iter(ovs);
|
||||
s = json_object_iter_key(iter);
|
||||
if (s)
|
||||
nm_utils_strdup_reset(&priv->db_uuid, s);
|
||||
}
|
||||
|
||||
/* Interfaces */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue