Karsten Hopp ccf9ce
To: vim_dev@googlegroups.com
Karsten Hopp ccf9ce
Subject: Patch 7.3.1098
Karsten Hopp ccf9ce
Fcc: outbox
Karsten Hopp ccf9ce
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp ccf9ce
Mime-Version: 1.0
Karsten Hopp ccf9ce
Content-Type: text/plain; charset=UTF-8
Karsten Hopp ccf9ce
Content-Transfer-Encoding: 8bit
Karsten Hopp ccf9ce
------------
Karsten Hopp ccf9ce
Karsten Hopp ccf9ce
Patch 7.3.1098
Karsten Hopp ccf9ce
Problem:    Python: Possible memory leaks
Karsten Hopp ccf9ce
Solution:   Add Py_XDECREF() calls. (ZyX)
Karsten Hopp ccf9ce
Files:	    src/if_py_both.h
Karsten Hopp ccf9ce
Karsten Hopp ccf9ce
Karsten Hopp ccf9ce
*** ../vim-7.3.1097/src/if_py_both.h	2013-06-02 17:41:50.000000000 +0200
Karsten Hopp ccf9ce
--- src/if_py_both.h	2013-06-02 18:01:56.000000000 +0200
Karsten Hopp ccf9ce
***************
Karsten Hopp ccf9ce
*** 1017,1022 ****
Karsten Hopp ccf9ce
--- 1017,1023 ----
Karsten Hopp ccf9ce
      if (*key == NUL)
Karsten Hopp ccf9ce
      {
Karsten Hopp ccf9ce
  	RAISE_NO_EMPTY_KEYS;
Karsten Hopp ccf9ce
+ 	Py_XDECREF(todecref);
Karsten Hopp ccf9ce
  	return NULL;
Karsten Hopp ccf9ce
      }
Karsten Hopp ccf9ce
  
Karsten Hopp ccf9ce
***************
Karsten Hopp ccf9ce
*** 1160,1165 ****
Karsten Hopp ccf9ce
--- 1161,1167 ----
Karsten Hopp ccf9ce
  
Karsten Hopp ccf9ce
      if (!(key = StringToChars(keyObject, &todecref)))
Karsten Hopp ccf9ce
  	return -1;
Karsten Hopp ccf9ce
+ 
Karsten Hopp ccf9ce
      if (*key == NUL)
Karsten Hopp ccf9ce
      {
Karsten Hopp ccf9ce
  	RAISE_NO_EMPTY_KEYS;
Karsten Hopp ccf9ce
***************
Karsten Hopp ccf9ce
*** 2216,2224 ****
Karsten Hopp ccf9ce
--- 2218,2228 ----
Karsten Hopp ccf9ce
  
Karsten Hopp ccf9ce
      if (!(key = StringToChars(keyObject, &todecref)))
Karsten Hopp ccf9ce
  	return NULL;
Karsten Hopp ccf9ce
+ 
Karsten Hopp ccf9ce
      if (*key == NUL)
Karsten Hopp ccf9ce
      {
Karsten Hopp ccf9ce
  	RAISE_NO_EMPTY_KEYS;
Karsten Hopp ccf9ce
+ 	Py_XDECREF(todecref);
Karsten Hopp ccf9ce
  	return NULL;
Karsten Hopp ccf9ce
      }
Karsten Hopp ccf9ce
  
Karsten Hopp ccf9ce
***************
Karsten Hopp ccf9ce
*** 2349,2357 ****
Karsten Hopp ccf9ce
--- 2353,2363 ----
Karsten Hopp ccf9ce
  
Karsten Hopp ccf9ce
      if (!(key = StringToChars(keyObject, &todecref)))
Karsten Hopp ccf9ce
  	return -1;
Karsten Hopp ccf9ce
+ 
Karsten Hopp ccf9ce
      if (*key == NUL)
Karsten Hopp ccf9ce
      {
Karsten Hopp ccf9ce
  	RAISE_NO_EMPTY_KEYS;
Karsten Hopp ccf9ce
+ 	Py_XDECREF(todecref);
Karsten Hopp ccf9ce
  	return -1;
Karsten Hopp ccf9ce
      }
Karsten Hopp ccf9ce
  
Karsten Hopp ccf9ce
***************
Karsten Hopp ccf9ce
*** 4568,4573 ****
Karsten Hopp ccf9ce
--- 4574,4580 ----
Karsten Hopp ccf9ce
  	    dict_unref(dict);
Karsten Hopp ccf9ce
  	    return -1;
Karsten Hopp ccf9ce
  	}
Karsten Hopp ccf9ce
+ 
Karsten Hopp ccf9ce
  	if (*key == NUL)
Karsten Hopp ccf9ce
  	{
Karsten Hopp ccf9ce
  	    dict_unref(dict);
Karsten Hopp ccf9ce
***************
Karsten Hopp ccf9ce
*** 4651,4656 ****
Karsten Hopp ccf9ce
--- 4658,4664 ----
Karsten Hopp ccf9ce
  	    dict_unref(dict);
Karsten Hopp ccf9ce
  	    return -1;
Karsten Hopp ccf9ce
  	}
Karsten Hopp ccf9ce
+ 
Karsten Hopp ccf9ce
  	if (*key == NUL)
Karsten Hopp ccf9ce
  	{
Karsten Hopp ccf9ce
  	    Py_DECREF(keyObject);
Karsten Hopp ccf9ce
*** ../vim-7.3.1097/src/version.c	2013-06-02 17:46:37.000000000 +0200
Karsten Hopp ccf9ce
--- src/version.c	2013-06-02 18:02:37.000000000 +0200
Karsten Hopp ccf9ce
***************
Karsten Hopp ccf9ce
*** 730,731 ****
Karsten Hopp ccf9ce
--- 730,733 ----
Karsten Hopp ccf9ce
  {   /* Add new patch number below this line */
Karsten Hopp ccf9ce
+ /**/
Karsten Hopp ccf9ce
+     1098,
Karsten Hopp ccf9ce
  /**/
Karsten Hopp ccf9ce
Karsten Hopp ccf9ce
-- 
Karsten Hopp ccf9ce
hundred-and-one symptoms of being an internet addict:
Karsten Hopp ccf9ce
47. You are so familiar with the WWW that you find the search engines useless.
Karsten Hopp ccf9ce
Karsten Hopp ccf9ce
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp ccf9ce
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp ccf9ce
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp ccf9ce
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///