Commit 11389448 authored by Benjamin Peterson's avatar Benjamin Peterson

only incref when using borrowing functions

parent aed97733
......@@ -2132,6 +2132,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
GLOBAL_NAME_ERROR_MSG, w);
break;
}
Py_INCREF(x);
}
else {
/* Slow-path if globals or builtins is not a dict */
......@@ -2147,7 +2148,6 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
}
}
}
Py_INCREF(x);
PUSH(x);
DISPATCH();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment