Commit 76f2b241 authored by Guido van Rossum's avatar Guido van Rossum

Fix refcount leak, courtesy Christian Heines.

parent eb33e5ae
......@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment