From 39d293c34d5dd948b1526936730798320acf1074 Mon Sep 17 00:00:00 2001 From: Paul Kramer <47924093+paulkram@users.noreply.github.com> Date: Sat, 10 Dec 2022 21:11:52 +0100 Subject: [PATCH] Fix wrong usage of C-sytle in place generated array (#1122) This should result in a address of temporary array. Co-authored-by: Paul Kramer --- src/apps/relay/prom_server.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/apps/relay/prom_server.c b/src/apps/relay/prom_server.c index eb945ba..2a3da9e 100644 --- a/src/apps/relay/prom_server.c +++ b/src/apps/relay/prom_server.c @@ -82,8 +82,9 @@ void start_prometheus_server(void) { prom_counter_new("turn_total_traffic_peer_sentb", "Represents total finished sessions peer sent bytes", 0, NULL)); // Create total allocations number gauge metric + const char *typeLabel[] = {"type"}; turn_total_allocations = prom_collector_registry_must_register_metric( - prom_gauge_new("turn_total_allocations", "Represents current allocations number", 1, (const char *[]){"type"})); + prom_gauge_new("turn_total_allocations", "Represents current allocations number", 1, typeLabel)); promhttp_set_active_collector_registry(NULL);