Skip to content

Commit def92d7

Browse files
committed
[3.10] Fix a potential reference-counting bug in long_pow (pythonGH-26690)
(cherry picked from commit 5924243) Co-authored-by: Mark Dickinson <[email protected]>
1 parent d03f342 commit def92d7

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
@@ -4185,6 +4185,7 @@ long_pow(PyObject *v, PyObject *w, PyObject *x)
41854185
goto Error;
41864186
Py_DECREF(a);
41874187
a = temp;
4188+
temp = NULL;
41884189
}
41894190

41904191
/* Reduce base by modulus in some cases:

0 commit comments

Comments
 (0)