mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 11:00:09 +01:00
ovs: fix dispose()
input and output must be freed only when not NULL. Also, ovsdb_disconnect() should do nothing if there is no client. Fixes:830a5a14cb(cherry picked from commit29984c07cd)
This commit is contained in:
parent
9d291821f2
commit
583a2a2cee
1 changed files with 11 additions and 5 deletions
|
|
@ -1292,6 +1292,9 @@ ovsdb_disconnect (NMOvsdb *self, gboolean is_disposing)
|
|||
gpointer user_data;
|
||||
gs_free_error GError *error = NULL;
|
||||
|
||||
if (!priv->client)
|
||||
return;
|
||||
|
||||
_LOGD ("disconnecting from ovsdb");
|
||||
nm_utils_error_set_cancelled (&error, is_disposing, "NMOvsdb");
|
||||
|
||||
|
|
@ -1528,11 +1531,14 @@ dispose (GObject *object)
|
|||
|
||||
ovsdb_disconnect (self, TRUE);
|
||||
|
||||
g_string_free (priv->input, TRUE);
|
||||
priv->input = NULL;
|
||||
g_string_free (priv->output, TRUE);
|
||||
priv->output = NULL;
|
||||
|
||||
if (priv->input) {
|
||||
g_string_free (priv->input, TRUE);
|
||||
priv->input = NULL;
|
||||
}
|
||||
if (priv->output) {
|
||||
g_string_free (priv->output, TRUE);
|
||||
priv->output = NULL;
|
||||
}
|
||||
if (priv->calls) {
|
||||
g_array_free (priv->calls, TRUE);
|
||||
priv->calls = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue