This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Build fixes for Win32 after the Coverity smoke.
[perl5.git] / dist / threads / threads.xs
index 182cd37..6175ba7 100644 (file)
@@ -714,10 +714,12 @@ S_ithread_create(
     PERL_SET_CONTEXT(aTHX);
     if (!thread) {
         MUTEX_UNLOCK(&MY_POOL.create_destruct_mutex);
-        int fd = PerlIO_fileno(Perl_error_log);
-        if (fd >= 0) {
-          /* If there's no error_log, we cannot scream about it missing. */
-          PERL_UNUSED_RESULT(PerlLIO_write(fd, PL_no_mem, strlen(PL_no_mem)));
+        {
+          int fd = PerlIO_fileno(Perl_error_log);
+          if (fd >= 0) {
+            /* If there's no error_log, we cannot scream about it missing. */
+            PERL_UNUSED_RESULT(PerlLIO_write(fd, PL_no_mem, strlen(PL_no_mem)));
+          }
         }
         my_exit(1);
     }