From: Mark Wooding Date: Tue, 22 Oct 2019 10:29:09 +0000 (+0100) Subject: buffer.c: Funnel control through a common exit point. X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb-python/commitdiff_plain/7c7a6f8e1c7937fb6fdac9ffac97cf1d0e344bb6 buffer.c: Funnel control through a common exit point. I'm not going on a rampage to fix this throughout the code (yet?), but while I'm here I might as well. --- diff --git a/buffer.c b/buffer.c index f615858..7a3bec7 100644 --- a/buffer.c +++ b/buffer.c @@ -186,12 +186,13 @@ static PyObject *rbmeth_getecptraw(PyObject *me, PyObject *arg) { PyObject *cobj; ec pt = EC_INIT; + PyObject *rc = 0; if (!PyArg_ParseTuple(arg, "O!:getecptraw", eccurve_pytype, &cobj)) goto end; if (ec_getraw(ECCURVE_C(cobj), BUF_B(me), &pt)) BUFERR("buffer exhausted"); - return (ecpt_pywrapout(cobj, &pt)); + rc = ecpt_pywrapout(cobj, &pt); end: - return (0); + return (rc); } static PyObject *rbmeth_getge(PyObject *me, PyObject *arg)