[Gmp-commit] /var/hg/gmp: mini-gmp/tests/t-str.c: free a pointer to avoid mem...

mercurial at gmplib.org mercurial at gmplib.org
Thu Nov 17 21:01:12 UTC 2016


details:   /var/hg/gmp/rev/d3b640ef4dd5
changeset: 17113:d3b640ef4dd5
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Thu Nov 17 21:54:08 2016 +0100
description:
mini-gmp/tests/t-str.c: free a pointer to avoid memory leaks.

diffstat:

 mini-gmp/mini-gmp.c    |  4 ++--
 mini-gmp/tests/t-str.c |  1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diffs (32 lines):

diff -r a92a2f5b908e -r d3b640ef4dd5 mini-gmp/mini-gmp.c
--- a/mini-gmp/mini-gmp.c	Thu Nov 17 03:30:43 2016 +0100
+++ b/mini-gmp/mini-gmp.c	Thu Nov 17 21:54:08 2016 +0100
@@ -454,7 +454,7 @@
     {
       mp_limb_t a = ap[i];
       /* Carry out */
-      mp_limb_t cy = a < b;;
+      mp_limb_t cy = a < b;
       rp[i] = a - b;
       b = cy;
     }
@@ -1597,7 +1597,7 @@
 mp_srcptr
 mpz_limbs_read (mpz_srcptr x)
 {
-  return x->_mp_d;;
+  return x->_mp_d;
 }
 
 mp_ptr
diff -r a92a2f5b908e -r d3b640ef4dd5 mini-gmp/tests/t-str.c
--- a/mini-gmp/tests/t-str.c	Thu Nov 17 03:30:43 2016 +0100
+++ b/mini-gmp/tests/t-str.c	Thu Nov 17 21:54:08 2016 +0100
@@ -310,6 +310,7 @@
 		}
 	    }
 	  free (ap);
+	  free (rp);
 	  testfree (bp);
 	}
     }


More information about the gmp-commit mailing list