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