summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorchgnrdv <52372310+chgnrdv@users.noreply.github.com>2023-06-22 21:30:19 (GMT)
committerGitHub <noreply@github.com>2023-06-22 21:30:19 (GMT)
commitcd5280367a3a7065d13b8f7234474f7a2e9a18fd (patch)
tree9aa9d1b2c5be502de29948e6ee63fd4e4009b672 /Python
parent46a3190fcf8580f322047395408cd60feba67041 (diff)
downloadcpython-cd5280367a3a7065d13b8f7234474f7a2e9a18fd.zip
cpython-cd5280367a3a7065d13b8f7234474f7a2e9a18fd.tar.gz
cpython-cd5280367a3a7065d13b8f7234474f7a2e9a18fd.tar.bz2
gh-105979: Fix exception handling in `unmarshal_frozen_code` (`Python/import.c`) (#105980)
Diffstat (limited to 'Python')
-rw-r--r--Python/import.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/import.c b/Python/import.c
index 969902a..9b1ad87 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;
}