This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
1. Add section to perlxs.pod describing that the refcount of AVs/HVs
[perl5.git] / ext / POSIX / POSIX.xs
index deefbd1..8a0188d 100644 (file)
@@ -1013,6 +1013,7 @@ localeconv()
 #ifdef HAS_LOCALECONV
        struct lconv *lcbuf;
        RETVAL = newHV();
+       sv_2mortal((SV*)RETVAL);
        if ((lcbuf = localeconv())) {
            /* the strings */
            if (lcbuf->decimal_point && *lcbuf->decimal_point)