8000 Clear sub-executors array upon dealloc · python/cpython@dcde4d3 · GitHub
[go: up one dir, main page]

Skip to content

Commit dcde4d3

Browse files
committed
Clear sub-executors array upon dealloc
1 parent 1450ca6 commit dcde4d3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Python/optimizer.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,11 @@ PyUnstable_Optimizer_NewCounter(void)
342342
static void
343343
uop_dealloc(_PyUOpExecutorObject *self) {
344344
_Py_ExecutorClear((_PyExecutorObject *)self);
345+
if (self->executors != NULL) {
346+
for (int i = Py_SIZE(self); --i >= 0; ) {
347+
Py_XDECREF(self->executors[i]);
348< 4F45 /td>+
}
349+
}
345350
PyObject_Free(self);
346351
}
347352

0 commit comments

Comments
 (0)
0