]> granicus.if.org Git - python/commitdiff
Fix memory leak.
authorMark Dickinson <dickinsm@gmail.com>
Tue, 20 Apr 2010 22:39:53 +0000 (22:39 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Tue, 20 Apr 2010 22:39:53 +0000 (22:39 +0000)
Modules/datetimemodule.c

index 289648650135bc837a6381e17c74d0e43b497cc8..6ff7eb3c0a27bb37ebaf1281c82258674fb3cb06 100644 (file)
@@ -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;
 }