summaryrefslogtreecommitdiff
path: root/src/if_py_both.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-12-07 14:28:43 +0100
committerBram Moolenaar <Bram@vim.org>2013-12-07 14:28:43 +0100
commitc2401d62e0f8de45598c8ed7d9e9b09227f6682d (patch)
tree6b4f0a851bf5e6fbedf278774ac9a58f4b5d3a37 /src/if_py_both.h
parentba2d44f33863e115b1858ab572829f403ad21883 (diff)
downloadvim-git-c2401d62e0f8de45598c8ed7d9e9b09227f6682d.tar.gz
updated for version 7.4.111v7.4.111
Problem: Memory leak in Python OptionsAssItem. (Ken Takata) Solution: Call Py_XDECREF() where needed. (ZyX)
Diffstat (limited to 'src/if_py_both.h')
-rw-r--r--src/if_py_both.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/if_py_both.h b/src/if_py_both.h
index a8188c16f..5a49d1e9e 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -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;
}