mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 7.4.1744
Problem: Python: Converting a sequence may leak memory. Solution: Decrement a reference. (Nikolay Pavlov)
This commit is contained in:
@@ -6070,7 +6070,7 @@ ConvertFromPyMapping(PyObject *obj, typval_T *tv)
|
||||
ConvertFromPySequence(PyObject *obj, typval_T *tv)
|
||||
{
|
||||
PyObject *lookup_dict;
|
||||
int ret = 0;
|
||||
int ret;
|
||||
|
||||
if (!(lookup_dict = PyDict_New()))
|
||||
return -1;
|
||||
@@ -6080,9 +6080,10 @@ ConvertFromPySequence(PyObject *obj, typval_T *tv)
|
||||
tv->v_type = VAR_LIST;
|
||||
tv->vval.v_list = (((ListObject *)(obj))->list);
|
||||
++tv->vval.v_list->lv_refcount;
|
||||
ret = 0;
|
||||
}
|
||||
else if (PyIter_Check(obj) || PySequence_Check(obj))
|
||||
return convert_dl(obj, tv, pyseq_to_tv, lookup_dict);
|
||||
ret = convert_dl(obj, tv, pyseq_to_tv, lookup_dict);
|
||||
else
|
||||
{
|
||||
PyErr_FORMAT(PyExc_TypeError,
|
||||
|
@@ -748,6 +748,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1744,
|
||||
/**/
|
||||
1743,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user