diff options
author | Benjamin Peterson <benjamin@python.org> | 2016-01-21 06:06:43 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2016-01-21 06:06:43 (GMT) |
commit | ef9cf0835230398bb1af134eabaef7c3cad0bce3 (patch) | |
tree | c9c180e2ee308464a0a49fe90b9f76d9264917b9 /Modules | |
parent | c836f717cd73be8bcc9a0d09ba2d048bca9549f6 (diff) | |
download | cpython-ef9cf0835230398bb1af134eabaef7c3cad0bce3.zip cpython-ef9cf0835230398bb1af134eabaef7c3cad0bce3.tar.gz cpython-ef9cf0835230398bb1af134eabaef7c3cad0bce3.tar.bz2 |
fix refleak in error condition
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/zipimport.c | 1 |
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; } |