Allocate the state copy's default_bar_style using the setter function rather than pv_strdup directly (#163).

This commit is contained in:
Andrew Wood
2025-07-25 23:44:12 +01:00
parent 092a30dd7d
commit c180cc85cf
+1 -4
View File
@@ -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);
}
/*