commit | 56a60878264ec73f0c65501a4e9d1187cec803bd | [log] [tgz] |
---|---|---|
author | Mark Dickinson <dickinsm@gmail.com> | Tue Apr 20 22:39:53 2010 +0000 |
committer | Mark Dickinson <dickinsm@gmail.com> | Tue Apr 20 22:39:53 2010 +0000 |
tree | 4257438722a3020e355d1e2a0b15233fa5339201 | |
parent | 7c186e2a18bf174afd5cccc8c35b7167d05f7e2a [diff] |
Fix memory leak.
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 @@ 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; }