ec.c (ecpt_pymul): Don't leak the scalar value.
[catacomb-python] / ec.c
diff --git a/ec.c b/ec.c
index 3cd52bc..c8cdebe 100644 (file)
--- a/ec.c
+++ b/ec.c
@@ -188,6 +188,7 @@ static PyObject *ecpt_pymul(PyObject *x, PyObject *y)
   if (ECPT_PYCHECK(x)) { PyObject *t; t = x; x = y; y = t; }
   if (!ECPT_PYCHECK(y) || (xx = tomp(x)) == 0) RETURN_NOTIMPL;
   ec_imul(ECPT_C(y), &zz, ECPT_P(y), xx);
+  MP_DROP(xx);
   return (ecpt_pywrap(ECPT_COBJ(y), &zz));
 }