mirror of
https://github.com/python/cpython.git
synced 2025-11-13 23:46:24 +00:00
fix refleak in error condition
This commit is contained in:
parent
c836f717cd
commit
ef9cf08352
1 changed files with 1 additions and 0 deletions
|
|
@ -1127,6 +1127,7 @@ get_data(PyObject *archive, PyObject *toc_entry)
|
||||||
bytes_read = fread(buf, 1, data_size, fp);
|
bytes_read = fread(buf, 1, data_size, fp);
|
||||||
} else {
|
} else {
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
Py_DECREF(raw_data);
|
||||||
PyErr_Format(ZipImportError, "can't read Zip file: %R", archive);
|
PyErr_Format(ZipImportError, "can't read Zip file: %R", archive);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue