diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2010-04-20 22:39:53 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2010-04-20 22:39:53 (GMT) |
commit | 56a60878264ec73f0c65501a4e9d1187cec803bd (patch) | |
tree | 4257438722a3020e355d1e2a0b15233fa5339201 /Modules | |
parent | 7c186e2a18bf174afd5cccc8c35b7167d05f7e2a (diff) | |
download | cpython-56a60878264ec73f0c65501a4e9d1187cec803bd.zip cpython-56a60878264ec73f0c65501a4e9d1187cec803bd.tar.gz cpython-56a60878264ec73f0c65501a4e9d1187cec803bd.tar.bz2 |
Fix memory leak.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/datetimemodule.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Modules/datetimemodule.c b/Modules/datetimemodule.c index 2896486..6ff7eb3 100644 --- a/Modules/datetimemodule.c +++ b/Modules/datetimemodule.c @@ -1914,10 +1914,9 @@ delta_remainder(PyObject *left, PyObject *right) return NULL; remainder = microseconds_to_delta(pyus_remainder); - if (remainder == NULL) { - Py_DECREF(divmod); + Py_DECREF(pyus_remainder); + if (remainder == NULL) return NULL; - } return remainder; } |