diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c index 42d0421f0c..9ce050ed7a 100644 --- a/src/nvim/terminal.c +++ b/src/nvim/terminal.c @@ -572,9 +572,10 @@ static int term_settermprop(VTermProp prop, VTermValue *val, void *data) case VTERM_PROP_TITLE: { Error err; - dict_set_value(term->buf->b_vars, - cstr_as_string("term_title"), - STRING_OBJ(cstr_as_string(val->string)), &err); + api_free_object(dict_set_value(term->buf->b_vars, + cstr_as_string("term_title"), + STRING_OBJ(cstr_as_string(val->string)), + &err)); break; }