mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-02 11:10:16 +01:00
ovs: fix leak of json objects
Fixes:830a5a14cb(cherry picked from commit139b9974fa) (cherry picked from commit35c101011d)
This commit is contained in:
parent
836154dee3
commit
68daab633e
1 changed files with 6 additions and 3 deletions
|
|
@ -349,14 +349,14 @@ _insert_interface (json_t *params, NMConnection *interface)
|
|||
if (s_ovs_iface)
|
||||
type = nm_setting_ovs_interface_get_interface_type (s_ovs_iface);
|
||||
|
||||
json_array_append (options, json_string ("map"));
|
||||
json_array_append_new (options, json_string ("map"));
|
||||
s_ovs_patch = nm_connection_get_setting_ovs_patch (interface);
|
||||
if (s_ovs_patch) {
|
||||
json_array_append (options, json_pack ("[[s, s]]",
|
||||
json_array_append_new (options, json_pack ("[[s, s]]",
|
||||
"peer",
|
||||
nm_setting_ovs_patch_get_peer (s_ovs_patch)));
|
||||
} else {
|
||||
json_array_append (options, json_array ());
|
||||
json_array_append_new (options, json_array ());
|
||||
}
|
||||
|
||||
json_array_append_new (params,
|
||||
|
|
@ -690,6 +690,9 @@ _delete_interface (NMOvsdb *self, json_t *params, const char *ifname)
|
|||
_expect_ovs_bridges (params, priv->db_uuid, bridges);
|
||||
_set_ovs_bridges (params, priv->db_uuid, new_bridges);
|
||||
}
|
||||
|
||||
json_decref (bridges);
|
||||
json_decref (new_bridges);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue