settings: keep connection alive in delete_auth_cb()

Before commit 3ecb57fdc4 ("settings: get rid of callback arguments
for nm_settings_connection_delete()") audit logging was done in the
callback, which was run by nm_settings_connection_delete() with a
reference to the connection to keep it alive. Now we have to keep an
extra reference to ensure it doesn't go away.

Fixes: 3ecb57fdc4
This commit is contained in:
Beniamino Galvani 2017-10-26 08:50:44 +02:00
parent 301cf7151b
commit 33cb2f3723

View file

@ -1884,8 +1884,11 @@ delete_auth_cb (NMSettingsConnection *self,
GError *error,
gpointer data)
{
gs_unref_object NMSettingsConnection *self_keep_alive = NULL;
gs_free_error GError *local = NULL;
self_keep_alive = g_object_ref (self);
if (error) {
nm_audit_log_connection_op (NM_AUDIT_OP_CONN_DELETE, self, FALSE, NULL, subject,
error->message);