From 076dbc0af7689c3a71a3c5505eff2bb127c4b8dc Mon Sep 17 00:00:00 2001 From: Dmitry Kasatkin Date: Thu, 26 Jan 2012 19:13:18 +0200 Subject: [PATCH] --- yaml --- r: 287117 b: refs/heads/master c: 43b2c0aeaab2237996a72f9b9d7952ba82d56913 h: refs/heads/master i: 287115: fccac68c38a8a6308dcfeb322da50f0097d6ce85 v: v3 --- [refs] | 2 +- trunk/lib/mpi/mpi-div.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 5f9c6ee0eff1..a7fa5e2cf894 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a6d68ecc56ed182644c81ef6917ce1f5404db7dd +refs/heads/master: 43b2c0aeaab2237996a72f9b9d7952ba82d56913 diff --git a/trunk/lib/mpi/mpi-div.c b/trunk/lib/mpi/mpi-div.c index 8a45717bd001..f68cbbb4d4a4 100644 --- a/trunk/lib/mpi/mpi-div.c +++ b/trunk/lib/mpi/mpi-div.c @@ -210,6 +210,8 @@ int mpi_tdiv_qr(MPI quot, MPI rem, MPI num, MPI den) * numerator would be gradually overwritten by the quotient limbs. */ if (qp == np) { /* Copy NP object to temporary space. */ np = marker[markidx++] = mpi_alloc_limb_space(nsize); + if (!np) + goto nomem; MPN_COPY(np, qp, nsize); } } else /* Put quotient at top of remainder. */