mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Fix for SF bug #489671 (Neil Norwitz): memory leak in test_richcmp.
Had nothing to do with rich comparisons -- some stack cleanup code was lost as a result of merging in Neil Schemenauer's generators patch. Reinserted the stack cleanup code, skipping it when yielding.
This commit is contained in:
parent
ffa260fb54
commit
35974fbf31
1 changed files with 8 additions and 0 deletions
|
@ -2296,6 +2296,14 @@ eval_frame(PyFrameObject *f)
|
||||||
|
|
||||||
} /* main loop */
|
} /* main loop */
|
||||||
|
|
||||||
|
if (why != WHY_YIELD) {
|
||||||
|
/* Pop remaining stack entries -- but when yielding */
|
||||||
|
while (!EMPTY()) {
|
||||||
|
v = POP();
|
||||||
|
Py_XDECREF(v);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (why != WHY_RETURN && why != WHY_YIELD)
|
if (why != WHY_RETURN && why != WHY_YIELD)
|
||||||
retval = NULL;
|
retval = NULL;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue