From cd5280367a3a7065d13b8f7234474f7a2e9a18fd Mon Sep 17 00:00:00 2001 From: chgnrdv <52372310+chgnrdv@users.noreply.github.com> Date: Fri, 23 Jun 2023 00:30:19 +0300 Subject: gh-105979: Fix exception handling in `unmarshal_frozen_code` (`Python/import.c`) (#105980) --- Python/import.c | 1 + 1 file changed, 1 insertion(+) (limited to 'Python/import.c') diff --git a/Python/import.c b/Python/import.c index 969902afea1..9b1ad87b84f 100644 --- a/Python/import.c +++ b/Python/import.c @@ -2071,6 +2071,7 @@ unmarshal_frozen_code(PyInterpreterState *interp, struct frozen_info *info) PyObject *co = PyMarshal_ReadObjectFromString(info->data, info->size); if (co == NULL) { /* Does not contain executable code. */ + PyErr_Clear(); set_frozen_error(FROZEN_INVALID, info->nameobj); return NULL; } -- cgit v1.2.3