Skip to content

Commit 20fdd15

Browse files
committed
fix refleak in error condition
1 parent 7ff7f97 commit 20fdd15

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Modules/zipimport.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,6 +1127,7 @@ get_data(PyObject *archive, PyObject *toc_entry)
11271127
bytes_read = fread(buf, 1, data_size, fp);
11281128
} else {
11291129
fclose(fp);
1130+
Py_DECREF(raw_data);
11301131
PyErr_Format(ZipImportError, "can't read Zip file: %R", archive);
11311132
return NULL;
11321133
}

0 commit comments

Comments
 (0)