Skip to content

Commit 6bfec26

Browse files
committed
goto instead of ERROR_IF to avoid leaks
1 parent 26fc7a3 commit 6bfec26

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Python/bytecodes.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2314,7 +2314,7 @@ dummy_func(
23142314
"context manager protocol",
23152315
Py_TYPE(mgr)->tp_name);
23162316
}
2317-
ERROR_IF(true, error);
2317+
goto error;
23182318
}
23192319
exit = _PyObject_LookupSpecial(mgr, &_Py_ID(__exit__));
23202320
if (exit == NULL) {
@@ -2326,7 +2326,7 @@ dummy_func(
23262326
Py_TYPE(mgr)->tp_name);
23272327
}
23282328
Py_DECREF(enter);
2329-
ERROR_IF(true, error);
2329+
goto error;
23302330
}
23312331
DECREF_INPUTS();
23322332
res = _PyObject_CallNoArgs(enter);

Python/generated_cases.c.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)