From f7e5f39d617097886346b2b75b480486553f8471 Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Mon, 31 Jul 2023 16:29:39 +0200 Subject: [PATCH] resolvectl: initialize the server state Since not all fields of the dispatch table are mandatory we might end up reading garbage if the optional field is not set. In CIs we were lucky enough (or probably unfortunate enough) that the garbage was printable, but in other cases the `show-server-state` verb would just fail with: $ resolvectl show-server-state Failed to print table: Invalid argument Follow-up to bc837621a38. --- src/resolve/resolvectl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/resolve/resolvectl.c b/src/resolve/resolvectl.c index 35c649096e2..81120433537 100644 --- a/src/resolve/resolvectl.c +++ b/src/resolve/resolvectl.c @@ -3023,7 +3023,7 @@ static int dump_server_state(JsonVariant *server) { bool packet_rrsig_missing; bool packet_invalid; bool packet_do_off; - } server_state; + } server_state = {}; int r; -- 2.47.3