mirror of
https://github.com/louisrubet/rpn
synced 2024-12-28 09:58:52 +01:00
#165: added mpfr_free_str() after valgrind
This commit is contained in:
parent
0589fd7f51
commit
1da7e582e8
1 changed files with 39 additions and 36 deletions
|
@ -121,8 +121,9 @@ static void print_fix(FILE* stream, mpfr_t real, int base)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char* str = mpfr_get_str(NULL, &exp, base, digits + exp + 1, real, floating_t::s_mpfr_rnd);
|
char* str = mpfr_get_str(NULL, &exp, base, digits + exp + 1, real, floating_t::s_mpfr_rnd);
|
||||||
|
if(str != NULL)
|
||||||
|
{
|
||||||
int len = strlen(str);
|
int len = strlen(str);
|
||||||
|
|
||||||
if (len > 0)
|
if (len > 0)
|
||||||
{
|
{
|
||||||
if (str[0] == '-')
|
if (str[0] == '-')
|
||||||
|
@ -168,6 +169,8 @@ static void print_fix(FILE* stream, mpfr_t real, int base)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
mpfr_free_str(str);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue