From 9aaaf96a6a0563a678c8bc3e65f126fae5b62f96 Mon Sep 17 00:00:00 2001 From: Leandro Ribeiro Date: Tue, 4 Feb 2020 00:05:47 -0300 Subject: [PATCH] compositor: destroy log context only after the destruction of subscribers Before commit "weston-log: destroy subscriptions with destruction of subscribers", we had to destroy subscribers before the log context. Currently there's no required order, both are valid. But since we've created log context before the subscribers, we can destroy it after them. This is a style change and also a prove that now this order is valid as well. Signed-off-by: Leandro Ribeiro --- compositor/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compositor/main.c b/compositor/main.c index 0a8dbe84..02944f7b 100644 --- a/compositor/main.c +++ b/compositor/main.c @@ -3380,9 +3380,9 @@ out: protocol_scope = NULL; weston_log_scope_destroy(log_scope); log_scope = NULL; - weston_log_ctx_destroy(log_ctx); weston_log_subscriber_destroy(logger); weston_log_subscriber_destroy(flight_rec); + weston_log_ctx_destroy(log_ctx); out_signals: for (i = ARRAY_LENGTH(signals) - 1; i >= 0; i--)