X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/catacomb-python/blobdiff_plain/67ac03c93a1ad6aa969887bfa380ca29dc6b510f..cb46f06b084bb7574b6f7cde13bf413f58a1e91c:/rand.c diff --git a/rand.c b/rand.c index 2c58e64..7e091b0 100644 --- a/rand.c +++ b/rand.c @@ -1249,7 +1249,7 @@ static PyObject *bbsget_x(PyObject *me, void *hunoz) static int bbsset_x(PyObject *me, PyObject *val, void *hunoz) { - mp *x = 0; grand *r = GRAND_R(me); int rc = -1; if (!x) NIERR("__del__"); + mp *x = 0; grand *r = GRAND_R(me); int rc = -1; if (!val) NIERR("__del__"); if ((x = getmp(val)) == 0) goto end; r->ops->misc(r, BBS_SET, x); rc = 0; end: mp_drop(x); return (rc); } @@ -1384,6 +1384,7 @@ static PyObject *meth__BBSPriv_generate(PyObject *me, rc->bp.n = MP_COPY(bp.n); end: mp_drop(bp.p); mp_drop(bp.q); mp_drop(bp.n); mp_drop(x); + droppgev(&evt); return ((PyObject *)rc); }