diff options
-rw-r--r-- | lib/libc/stdlib/strfmon.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libc/stdlib/strfmon.c b/lib/libc/stdlib/strfmon.c index abfa332..20c69be 100644 --- a/lib/libc/stdlib/strfmon.c +++ b/lib/libc/stdlib/strfmon.c @@ -225,6 +225,8 @@ strfmon(char * __restrict s, size_t maxsize, const char * __restrict format, goto format_error; } + if (currency_symbol != NULL) + free(currency_symbol); if (flags & USE_INTL_CURRENCY) { currency_symbol = strdup(lc->int_curr_symbol); if (currency_symbol != NULL) @@ -253,6 +255,8 @@ strfmon(char * __restrict s, size_t maxsize, const char * __restrict format, pad_size = 0; } + if (asciivalue != NULL) + free(asciivalue); asciivalue = __format_grouped_double(value, &flags, left_prec, right_prec, pad_char); if (asciivalue == NULL) |