mirror of https://github.com/python/cpython
Fix refcount leak, courtesy Christian Heines.
This commit is contained in:
parent
eb33e5ae79
commit
76f2b2416a
|
@ -852,8 +852,9 @@ get_data(char *archive, PyObject *toc_entry)
|
||||||
buf[data_size] = '\0';
|
buf[data_size] = '\0';
|
||||||
|
|
||||||
if (compress == 0) { /* data is not compressed */
|
if (compress == 0) { /* data is not compressed */
|
||||||
raw_data = PyBytes_FromStringAndSize(buf, data_size);
|
data = PyBytes_FromStringAndSize(buf, data_size);
|
||||||
return raw_data;
|
Py_DECREF(raw_data);
|
||||||
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Decompress with zlib */
|
/* Decompress with zlib */
|
||||||
|
|
Loading…
Reference in New Issue