mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 05:20:08 +01:00
ovs: don't consume error in method callback
The error should be freed by callback functions, but only _monitor_bridges_cb() actually does it. Simplify this by letting the caller own the error. Fixes:830a5a14cb(cherry picked from commit878a3a4125)
This commit is contained in:
parent
f05f12f53b
commit
e4d237d86b
1 changed files with 2 additions and 6 deletions
|
|
@ -1316,15 +1316,13 @@ ovsdb_disconnect (NMOvsdb *self, gboolean is_disposing)
|
|||
OvsdbMethodCall *call;
|
||||
OvsdbMethodCallback callback;
|
||||
gpointer user_data;
|
||||
GError *error;
|
||||
gs_free_error GError *error = NULL;
|
||||
|
||||
_LOGD ("disconnecting from ovsdb");
|
||||
nm_utils_error_set_cancelled (&error, is_disposing, "NMOvsdb");
|
||||
|
||||
while (priv->calls->len) {
|
||||
error = NULL;
|
||||
call = &g_array_index (priv->calls, OvsdbMethodCall, priv->calls->len - 1);
|
||||
nm_utils_error_set_cancelled (&error, is_disposing, "NMOvsdb");
|
||||
|
||||
callback = call->callback;
|
||||
user_data = call->user_data;
|
||||
g_array_remove_index (priv->calls, priv->calls->len - 1);
|
||||
|
|
@ -1347,8 +1345,6 @@ _monitor_bridges_cb (NMOvsdb *self, json_t *result, GError *error, gpointer user
|
|||
_LOGI ("%s", error->message);
|
||||
ovsdb_disconnect (self, FALSE);
|
||||
}
|
||||
|
||||
g_clear_error (&error);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue