Commit d018b737 authored by Stefan Krah's avatar Stefan Krah

Issue #15868: Fix refleak in bytesio.c (Coverity #715365).

parent 77de7d64
......@@ -692,9 +692,11 @@ bytesio_getstate(bytesio *self)
}
else {
dict = PyDict_Copy(self->dict);
if (dict == NULL)
if (dict == NULL) {
Py_DECREF(initvalue);
return NULL;
}
}
state = Py_BuildValue("(OnN)", initvalue, self->pos, dict);
Py_DECREF(initvalue);
......
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