From c180cc85cf1d0eb82bb986ffcca5955fb426f95b Mon Sep 17 00:00:00 2001 From: Andrew Wood Date: Fri, 25 Jul 2025 23:44:12 +0100 Subject: [PATCH] Allocate the state copy's default_bar_style using the setter function rather than pv_strdup directly (#163). --- src/pv/watchpid.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/pv/watchpid.c b/src/pv/watchpid.c index 17270f0..e6461a7 100644 --- a/src/pv/watchpid.c +++ b/src/pv/watchpid.c @@ -503,10 +503,7 @@ int pv_watchpid_scanfds(pvstate_t state, * Duplicate the default bar style string, if there is one. */ if (NULL != state->control.default_bar_style) { - /*@-mustfreeonly@ *//* splint - this is not a leak, this is a new entry. */ - info_array[use_idx].state->control.default_bar_style = - pv_strdup(state->control.default_bar_style); - /*@+mustfreeonly@ */ + pv_state_default_bar_style_set(info_array[use_idx].state, state->control.default_bar_style); } /*