mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06: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: {
|
case VTERM_PROP_TITLE: {
|
||||||
Error err;
|
Error err;
|
||||||
dict_set_value(term->buf->b_vars,
|
api_free_object(dict_set_value(term->buf->b_vars,
|
||||||
cstr_as_string("term_title"),
|
cstr_as_string("term_title"),
|
||||||
STRING_OBJ(cstr_as_string(val->string)), &err);
|
STRING_OBJ(cstr_as_string(val->string)),
|
||||||
|
&err));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user