8000 Fix a potential reference-counting bug in long_pow (GH-26690) · python/cpython@5924243 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5924243

Browse files
authored
Fix a potential reference-counting bug in long_pow (GH-26690)
1 parent 17b16e1 commit 5924243

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)
0