summaryrefslogtreecommitdiffstats
path: root/Modules/zipimport.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/zipimport.c')
-rw-r--r--Modules/zipimport.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/zipimport.c b/Modules/zipimport.c
index 42cb9d0..42bb7a5 100644
--- a/Modules/zipimport.c
+++ b/Modules/zipimport.c
@@ -852,8 +852,9 @@ get_data(char *archive, PyObject *toc_entry)
buf[data_size] = '\0';
if (compress == 0) { /* data is not compressed */
- raw_data = PyBytes_FromStringAndSize(buf, data_size);
- return raw_data;
+ data = PyBytes_FromStringAndSize(buf, data_size);
+ Py_DECREF(raw_data);
+ return data;
}
/* Decompress with zlib */