From ff8602829e3a71e4f2bbf389d5001234c8ae0f00 Mon Sep 17 00:00:00 2001 From: Donat Zenichev Date: Tue, 19 May 2026 17:53:58 +0200 Subject: [PATCH] MT#61856 main: `initial_rtpe_config` copy completeness The `fill_initial_rtpe_cfg()` func doesn't copy `RTPE_CONFIG_STR_PARAMS` and `RTPE_CONFIG_CHARPP_PARAMS`, even though the `unfill_initial_rtpe_cfg()` func frees them. Globally it starts zeroed and this may never crash, but then the snapshot is still incomplete. Change-Id: I448ee6f8b9a22ad066bb57a9acd14134b7a71869 --- daemon/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/daemon/main.c b/daemon/main.c index b5cf9da8c..2ca01cda0 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -1583,6 +1583,14 @@ RTPE_CONFIG_ENUM_PARAMS #define X(s) ini_rtpe_cfg->s = g_strdup(rtpe_config.s); RTPE_CONFIG_CHARP_PARAMS +#undef X + +#define X(s) ini_rtpe_cfg->s = g_strdupv(rtpe_config.s); +RTPE_CONFIG_CHARPP_PARAMS +#undef X + +#define X(s) ini_rtpe_cfg->s = str_dup_str(&rtpe_config.s); +RTPE_CONFIG_STR_PARAMS #undef X memcpy(&ini_rtpe_cfg->common.log_levels, &rtpe_config.common.log_levels, sizeof(ini_rtpe_cfg->common.log_levels));