summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Pena <felipensp@gmail.com>2013-07-12 20:23:00 -0300
committerFelipe Pena <felipensp@gmail.com>2013-07-12 20:23:00 -0300
commit281936b29535ae095350abb274acef0ae548a431 (patch)
treed0662d1598943a579b2ad9be82afeb97280876b1
parent0ddb3d97de1f4c7e2a2a81182aa581ac76f2a300 (diff)
downloadphp-git-281936b29535ae095350abb274acef0ae548a431.tar.gz
- Fixed bug #65227 (Memory leak in gmp_cmp second parameter)
-rw-r--r--NEWS3
-rw-r--r--ext/gmp/gmp.c1
2 files changed, 4 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 5507b2a29a..ba2922dd79 100644
--- a/NEWS
+++ b/NEWS
@@ -26,6 +26,9 @@ PHP NEWS
. Fixed bug #63983 (enabling FPM borks compile on FreeBSD).
(chibisuke at web dot de, Felipe)
+- GMP:
+ . Fixed bug #65227 (Memory leak in gmp_cmp second parameter). (Felipe)
+
- Imap:
. Fixed bug #64467 (Segmentation fault after imap_reopen failure).
(askalski at gmail dot com)
diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c
index c9da09b230..f8c3a0773b 100644
--- a/ext/gmp/gmp.c
+++ b/ext/gmp/gmp.c
@@ -1333,6 +1333,7 @@ ZEND_FUNCTION(gmp_cmp)
res = mpz_cmp_si(*gmpnum_a, Z_LVAL_PP(b_arg));
} else {
res = mpz_cmp(*gmpnum_a, *gmpnum_b);
+ FREE_GMP_TEMP(temp_b);
}
FREE_GMP_TEMP(temp_a);