Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 56a6087

Browse files
committed
Fix memory leak.
1 parent 7c186e2 commit 56a6087

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

Modules/datetimemodule.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1914,10 +1914,9 @@ delta_remainder(PyObject *left, PyObject *right)
19141914
return NULL;
19151915

19161916
remainder = microseconds_to_delta(pyus_remainder);
1917-
if (remainder == NULL) {
1918-
Py_DECREF(divmod);
1917+
Py_DECREF(pyus_remainder);
1918+
if (remainder == NULL)
19191919
return NULL;
1920-
}
19211920

19221921
return remainder;
19231922
}

0 commit comments

Comments
 (0)