Skip to content

Commit 1a195c6

Browse files
committed
Fix usage of PyStackRef_FromPyObjectSteal in _CALL_STR_1
This was missed in pythongh-124894
1 parent fe398ba commit 1a195c6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Python/bytecodes.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3629,11 +3629,12 @@ dummy_func(
36293629
DEOPT_IF(!PyStackRef_IsNull(null));
36303630
DEOPT_IF(callable_o != (PyObject *)&PyUnicode_Type);
36313631
STAT_INC(CALL, hit);
3632-
res = PyStackRef_FromPyObjectSteal(PyObject_Str(arg_o));
3632+
PyObject *res_o = PyObject_Str(arg_o);
36333633
DEAD(null);
36343634
DEAD(callable);
36353635
PyStackRef_CLOSE(arg);
3636-
ERROR_IF(PyStackRef_IsNull(res), error);
3636+
ERROR_IF(res_o == NULL, error);
3637+
res = PyStackRef_FromPyObjectSteal(res_o);
36373638
}
36383639

36393640
macro(CALL_STR_1) =

0 commit comments

Comments
 (0)