if (!EC_FIND(c, p, xx)) VALERR("not on the curve");
} else if (PySequence_Check(x)) {
t = x; x = 0;
- n = PySequence_Size(t);
+ n = PySequence_Size(t); if (n < 0) goto end;
if (n != 2 && (n != 3 || !c))
TYERR("want sequence of two or three items");
if ((x = PySequence_GetItem(t, 0)) == 0 ||
goto end;
return (ecpt_pywrapout(ty, &p));
end:
- EC_DESTROY(&p);
+ mp_drop(p.x); mp_drop(p.y); mp_drop(p.z);
return (0);
}
goto end;
return (ecpt_pywrap((PyObject *)ty, &p));
end:
- EC_DESTROY(&p);
+ mp_drop(p.x); mp_drop(p.y); mp_drop(p.z);
return (0);
}