nm-sudo: cancel quit_cancellable during shutdown

This commit is contained in:
Thomas Haller 2021-08-03 11:29:07 +02:00
parent 62a9a48cc2
commit 2b8add959f
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -627,9 +627,11 @@ main(int argc, char **argv)
}
done:
gl->is_shutting_down_cleanup = TRUE;
_LOGD("shutdown: cleanup");
gl->is_shutting_down_cleanup = TRUE;
g_cancellable_cancel(gl->quit_cancellable);
nm_assert(c_list_is_empty(&gl->pending_jobs_lst_head));
if (gl->service_regist_id != 0) {
@ -640,7 +642,6 @@ done:
g_dbus_connection_signal_unsubscribe(gl->dbus_connection,
nm_steal_int(&gl->name_owner_changed_id));
}
nm_clear_g_cancellable(&gl->quit_cancellable);
nm_clear_g_source_inst(&gl->source_sigterm);
nm_clear_g_source_inst(&gl->source_idle_timeout);
nm_clear_g_free(&gl->name_owner);
@ -658,6 +659,8 @@ done:
}
}
nm_clear_g_cancellable(&gl->quit_cancellable);
_LOGD("exit (%d)", exit_code);
return exit_code;
}