]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.111 v7.4.111
authorBram Moolenaar <Bram@vim.org>
Sat, 7 Dec 2013 13:28:43 +0000 (14:28 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 7 Dec 2013 13:28:43 +0000 (14:28 +0100)
Problem:    Memory leak in Python OptionsAssItem. (Ken Takata)
Solution:   Call Py_XDECREF() where needed. (ZyX)

src/if_py_both.h
src/version.c

index a8188c16f4db11c4bee876e01f3b1d969e517f58..5a49d1e9e2dc2108677f8e36e467db377c00aa4a 100644 (file)
@@ -3005,11 +3005,14 @@ OptionsAssItem(OptionsObject *self, PyObject *keyObject, PyObject *valObject)
     else
     {
        char_u          *val;
-       PyObject        *todecref;
+       PyObject        *todecref2;
 
-       if ((val = StringToChars(valObject, &todecref)))
+       if ((val = StringToChars(valObject, &todecref2)))
+       {
            ret = set_option_value_for(key, 0, val, opt_flags,
                                    self->opt_type, self->from);
+           Py_XDECREF(todecref2);
+       }
        else
            ret = -1;
     }
index 4a4bcd0a2e8f1b5ecc8536c9165bb792ac70cebe..5ec24787459f63a5196885b663ea1a2d0746c8cd 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    111,
 /**/
     110,
 /**/