diff options
author | Christian Heimes <christian@cheimes.de> | 2008-05-08 01:20:25 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2008-05-08 01:20:25 (GMT) |
commit | bcd2c08e11e6739d975345ac832f1722f8752289 (patch) | |
tree | 0c0d9d4aa8c33f53760a902764552e9ba0c684d8 /Python/getargs.c | |
parent | ec924c995c95198e4391f426a6581e5ccedc1bc6 (diff) | |
download | cpython-bcd2c08e11e6739d975345ac832f1722f8752289.zip cpython-bcd2c08e11e6739d975345ac832f1722f8752289.tar.gz cpython-bcd2c08e11e6739d975345ac832f1722f8752289.tar.bz2 |
Fixed a memory leak introduced in r62462
Diffstat (limited to 'Python/getargs.c')
-rw-r--r-- | Python/getargs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/getargs.c b/Python/getargs.c index 6a50ef6..2bbafdb 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -670,8 +670,10 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags, if (float_argument_error(arg)) return converterr("integer<n>", arg, msgbuf, bufsize); iobj = PyNumber_Index(arg); - if (iobj != NULL) + if (iobj != NULL) { ival = PyLong_AsSsize_t(iobj); + Py_DECREF(iobj); + } if (ival == -1 && PyErr_Occurred()) return converterr("integer<n>", arg, msgbuf, bufsize); *p = ival; |