From: Artur Bergman Date: Wed, 26 Sep 2001 07:04:21 +0000 (+0000) Subject: Fix negative refcount introduced by #12223. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d5ecd10939d5f9a31faea7581a6303b408507b6f;p=p5sagit%2Fp5-mst-13.2.git Fix negative refcount introduced by #12223. p4raw-id: //depot/perl@12225 --- diff --git a/ext/threads/threads.xs b/ext/threads/threads.xs index 5678bcb..cbfcd1f 100755 --- a/ext/threads/threads.xs +++ b/ext/threads/threads.xs @@ -281,12 +281,12 @@ BOOT: #else thread->thr = pthread_self(); #endif + SHAREDSvEDIT(threads); thread_tid_ptr = Perl_newSVuv(PL_sharedsv_space, PTR2UV(thread->thr)); thread_ptr = Perl_newSVuv(PL_sharedsv_space, PTR2UV(thread)); - SHAREDSvEDIT(threads); hv_store_ent((HV*) SHAREDSvGET(threads), thread_tid_ptr, thread_ptr,0); - SHAREDSvRELEASE(threads); SvREFCNT_dec(thread_tid_ptr); + SHAREDSvRELEASE(threads); } MUTEX_INIT(&create_mutex);