summaryrefslogtreecommitdiff
path: root/ext/gmp/gmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/gmp/gmp.c')
-rw-r--r--ext/gmp/gmp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c
index c9da09b23..e3a3563aa 100644
--- a/ext/gmp/gmp.c
+++ b/ext/gmp/gmp.c
@@ -1069,7 +1069,7 @@ ZEND_FUNCTION(gmp_powm)
zval **base_arg, **exp_arg, **mod_arg;
mpz_t *gmpnum_base, *gmpnum_exp, *gmpnum_mod, *gmpnum_result;
int use_ui = 0;
- int temp_base, temp_exp, temp_mod;
+ int temp_base = 0, temp_exp = 0, temp_mod;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ZZZ", &base_arg, &exp_arg, &mod_arg) == FAILURE){
return;
@@ -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);