#165: added mpfr_free_str() after valgrind

This commit is contained in:
Louis Rubet 2017-06-29 13:59:57 +02:00
parent 0589fd7f51
commit 1da7e582e8

View file

@ -121,8 +121,9 @@ static void print_fix(FILE* stream, mpfr_t real, int base)
else
{
char* str = mpfr_get_str(NULL, &exp, base, digits + exp + 1, real, floating_t::s_mpfr_rnd);
if(str != NULL)
{
int len = strlen(str);
if (len > 0)
{
if (str[0] == '-')
@ -168,6 +169,8 @@ static void print_fix(FILE* stream, mpfr_t real, int base)
}
}
}
mpfr_free_str(str);
}
}
}