summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/zipimport.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/zipimport.c b/Modules/zipimport.c
index f2cc245..55bfb5d 100644
--- a/Modules/zipimport.c
+++ b/Modules/zipimport.c
@@ -1127,6 +1127,7 @@ get_data(PyObject *archive, PyObject *toc_entry)
bytes_read = fread(buf, 1, data_size, fp);
} else {
fclose(fp);
+ Py_DECREF(raw_data);
PyErr_Format(ZipImportError, "can't read Zip file: %R", archive);
return NULL;
}