Patch 7.4.1744
Problem:    Python: Converting a sequence may leak memory.
Solution:   Decrement a reference. (Nikolay Pavlov)
Files:      src/if_py_both.h


*** ../vim-7.4.1743/src/if_py_both.h    2016-04-14 23:10:35.644383092 +0200
--- src/if_py_both.h    2016-04-15 20:37:53.920954094 +0200
***************
*** 6070,6076 ****
  ConvertFromPySequence(PyObject *obj, typval_T *tv)
  {
      PyObject  *lookup_dict;
!     int               ret = 0;
  
      if (!(lookup_dict = PyDict_New()))
        return -1;
--- 6070,6076 ----
  ConvertFromPySequence(PyObject *obj, typval_T *tv)
  {
      PyObject  *lookup_dict;
!     int               ret;
  
      if (!(lookup_dict = PyDict_New()))
        return -1;
***************
*** 6080,6088 ****
        tv->v_type = VAR_LIST;
        tv->vval.v_list = (((ListObject *)(obj))->list);
        ++tv->vval.v_list->lv_refcount;
      }
      else if (PyIter_Check(obj) || PySequence_Check(obj))
!       return convert_dl(obj, tv, pyseq_to_tv, lookup_dict);
      else
      {
        PyErr_FORMAT(PyExc_TypeError,
--- 6080,6089 ----
        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))
!       ret = convert_dl(obj, tv, pyseq_to_tv, lookup_dict);
      else
      {
        PyErr_FORMAT(PyExc_TypeError,
*** ../vim-7.4.1743/src/version.c       2016-04-14 23:10:35.644383092 +0200
--- src/version.c       2016-04-15 20:38:40.776453441 +0200
***************
*** 750,751 ****
--- 750,753 ----
  {   /* Add new patch number below this line */
+ /**/
+     1744,
  /**/

-- 
Microsoft's definition of a boolean: TRUE, FALSE, MAYBE
"Embrace and extend"...?

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui