buffer.c: Funnel control through a common exit point.
[catacomb-python] / buffer.c
index f615858..7a3bec7 100644 (file)
--- 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)