diff options
Diffstat (limited to 'locale.c')
-rw-r--r-- | locale.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -2609,14 +2609,18 @@ S_wrap_wsetlocale(pTHX_ const int category, const char *locale) } } + WSETLOCALE_LOCK; const wchar_t * wresult = _wsetlocale(category, wlocale); Safefree(wlocale); if (! wresult) { + WSETLOCALE_UNLOCK; return NULL; } const char * result = Win_wstring_to_utf8_string(wresult); + WSETLOCALE_UNLOCK; + SAVEFREEPV(result); /* is there something better we can do here? */ return result; |