This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add Perl_setlocale()
[perl5.git] / perl.c
diff --git a/perl.c b/perl.c
index 9817220..a638bae 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -1163,6 +1163,11 @@ perl_destruct(pTHXx)
 #  endif
 #endif
 
+    if (PL_setlocale_buf) {
+        Safefree(PL_setlocale_buf);
+        PL_setlocale_buf = NULL;
+    }
+
     if (PL_langinfo_buf) {
         Safefree(PL_langinfo_buf);
         PL_langinfo_buf = NULL;