This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Eliminated unitialised clone_params value bug accidentally added with
[perl5.git] / ext / threads / threads.xs
index c734108..5415914 100755 (executable)
@@ -644,11 +644,11 @@ S_ithread_create(
         SvREFCNT_dec(PL_endav);
         PL_endav = newAV();
 
+       clone_param.flags = 0;
         if (SvPOK(init_function)) {
             thread->init_function = newSV(0);
             sv_copypv(thread->init_function, init_function);
         } else {
-            clone_param.flags = 0;
             thread->init_function = sv_dup(init_function, &clone_param);
             if (SvREFCNT(thread->init_function) == 0) {
                 SvREFCNT_inc_void(thread->init_function);