From c76da71ee900ba9698a1cca4e84b05338843abf0 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Oct 04 2012 22:36:23 +0000 Subject: - patchlevel 670 --- diff --git a/7.3.670 b/7.3.670 new file mode 100644 index 0000000..91b4caa --- /dev/null +++ b/7.3.670 @@ -0,0 +1,88 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.670 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.670 +Problem: Python: memory leaks when there are exceptions. +Solution: Add DICTKEY_UNREF in the right places. (ZyX) +Files: src/if_py_both.h + + +*** ../vim-7.3.669/src/if_py_both.h 2012-09-12 20:21:38.000000000 +0200 +--- src/if_py_both.h 2012-09-21 13:32:13.000000000 +0200 +*************** +*** 799,812 **** + + di = dict_find(((DictionaryObject *) (self))->dict, key, -1); + + if (di == NULL) + { + PyErr_SetString(PyExc_IndexError, _("no such key in dictionary")); + return NULL; + } + +- DICTKEY_UNREF +- + return ConvertToPyObject(&di->di_tv); + } + +--- 799,812 ---- + + di = dict_find(((DictionaryObject *) (self))->dict, key, -1); + ++ DICTKEY_UNREF ++ + if (di == NULL) + { + PyErr_SetString(PyExc_IndexError, _("no such key in dictionary")); + return NULL; + } + + return ConvertToPyObject(&di->di_tv); + } + +*************** +*** 835,840 **** +--- 835,841 ---- + + if (di == NULL) + { ++ DICTKEY_UNREF + PyErr_SetString(PyExc_IndexError, _("no such key in dictionary")); + return -1; + } +*************** +*** 859,864 **** +--- 860,866 ---- + + if (dict_add(d, di) == FAIL) + { ++ DICTKEY_UNREF + vim_free(di); + PyErr_SetVim(_("failed to add key to dictionary")); + return -1; +*** ../vim-7.3.669/src/version.c 2012-09-21 13:26:44.000000000 +0200 +--- src/version.c 2012-09-21 13:42:43.000000000 +0200 +*************** +*** 721,722 **** +--- 721,724 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 670, + /**/ + +-- +TALL KNIGHT: Firstly. You must get us another shrubbery! +OTHER KNIGHTS: More shrubberies! More shrubberies for the ex-Knights of Ni! +ARTHUR: Not another shrubbery - + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- 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 ///