mirror of
https://github.com/neovim/neovim.git
synced 2024-12-21 03:35:02 -07:00
terminal.c: Fix memory leak #2982
dict_set_value() returns the replaced Object in a dictionary. Here the Object is unused and needs to be freed.
This commit is contained in:
parent
e0b550b5f0
commit
9a72f6b955
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user