Fix leak involving BuildValue("...O...").
This commit is contained in:
parent
ebee0256f3
commit
9c6ba5e901
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue