Skip to content

Commit 9ee8752

Browse files
Fix a potential reference-counting bug in long_pow (GH-26690) (#26702)
(cherry picked from commit 5924243) Co-authored-by: Mark Dickinson <[email protected]> Co-authored-by: Mark Dickinson <[email protected]>
1 parent a9e20cf commit 9ee8752

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Objects/longobject.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4312,6 +4312,7 @@ long_pow(PyObject *v, PyObject *w, PyObject *x)
43124312
goto Error;
43134313
Py_DECREF(a);
43144314
a = temp;
4315+
temp = NULL;
43154316
}
43164317

43174318
/* Reduce base by modulus in some cases:

0 commit comments

Comments
 (0)