Kaydet (Commit) 9c6ba5e9 authored tarafından Guido van Rossum's avatar Guido van Rossum

Fix leak involving BuildValue("...O...").

üst ebee0256
......@@ -492,9 +492,13 @@ binascii_a2b_hqx(self, args)
Py_DECREF(rv);
return NULL;
}
_PyString_Resize(&rv, (bin_data - (unsigned char *)PyString_AsString(rv)));
if ( rv )
return Py_BuildValue("Oi", rv, done);
_PyString_Resize(
&rv, (bin_data - (unsigned char *)PyString_AsString(rv)));
if (rv) {
PyObject *rrv = Py_BuildValue("Oi", rv, done);
Py_DECREF(rv);
return rrv;
}
return NULL;
}
......
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