In 2708ce62d2 (branch: sort detached HEAD based on a flag, 2021-01-07) a call to wt_status_state_free_buffers, responsible of freeing the resources that could be allocated in the local struct wt_status_state state, was eliminated. The call to wt_status_state_free_buffers was introduced in 962dd7ebc3 (wt-status: introduce wt_status_state_free_buffers(), 2020-09-27). This commit brings back that call in get_head_description. Signed-off-by: Rubén Justo <rjusto@xxxxxxxxx> --- ref-filter.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ref-filter.c b/ref-filter.c index fd1cb14b0f..914908fac5 100644 --- a/ref-filter.c +++ b/ref-filter.c @@ -1722,6 +1722,8 @@ char *get_head_description(void) } else strbuf_addstr(&desc, _("(no branch)")); + wt_status_state_free_buffers(&state); + return strbuf_detach(&desc, NULL); } -- 2.36.1