[vim] 58/139: patch 7.4.1744 Problem: Python: Converting a sequence may leak memory. Solution: Decrement a reference. (Nikolay Pavlov)

James McCoy jamessan at debian.org
Fri May 6 04:00:02 UTC 2016


This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository vim.

commit 66210042892389d36e3d37203ec77f61467bfb1c
Author: Bram Moolenaar <Bram at vim.org>
Date:   Fri Apr 15 20:40:41 2016 +0200

    patch 7.4.1744
    Problem:    Python: Converting a sequence may leak memory.
    Solution:   Decrement a reference. (Nikolay Pavlov)
---
 src/if_py_both.h | 5 +++--
 src/version.c    | 2 ++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/if_py_both.h b/src/if_py_both.h
index 0b701ae..c6a8c44 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -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,
diff --git a/src/version.c b/src/version.c
index aa181fb..1dd7d49 100644
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1744,
+/**/
     1743,
 /**/
     1742,

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git



More information about the pkg-vim-maintainers mailing list