Skip to content

Commit 8a4f33c

Browse files
committed
updated for version 7.4.111
Problem: Memory leak in Python OptionsAssItem. (Ken Takata) Solution: Call Py_XDECREF() where needed. (ZyX)
1 parent a206e4b commit 8a4f33c

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/if_py_both.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3005,11 +3005,14 @@ OptionsAssItem(OptionsObject *self, PyObject *keyObject, PyObject *valObject)
30053005
else
30063006
{
30073007
char_u *val;
3008-
PyObject *todecref;
3008+
PyObject *todecref2;
30093009

3010-
if ((val = StringToChars(valObject, &todecref)))
3010+
if ((val = StringToChars(valObject, &todecref2)))
3011+
{
30113012
ret = set_option_value_for(key, 0, val, opt_flags,
30123013
self->opt_type, self->from);
3014+
Py_XDECREF(todecref2);
3015+
}
30133016
else
30143017
ret = -1;
30153018
}

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,8 @@ static char *(features[]) =
738738

739739
static int included_patches[] =
740740
{ /* Add new patch number below this line */
741+
/**/
742+
111,
741743
/**/
742744
110,
743745
/**/

0 commit comments

Comments
 (0)