diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-05 02:28:04 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-05 02:28:04 +0000 |
commit | 5f6447b607c0041fcf4f5ff536b6919bda7f85b7 (patch) | |
tree | bb708ba585a7e05c8df2ec154de79108e18efca7 /sv.c | |
parent | dcb4812c733545a68ef39b77c2dc4f7d440de203 (diff) | |
download | perl-5f6447b607c0041fcf4f5ff536b6919bda7f85b7.tar.gz |
avoid race condition (storing ptr to SV before incrementing its
REFCNT) and warning in newRV()
p4raw-id: //depot/perl@1314
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -3708,10 +3708,7 @@ newRV_noinc(SV *tmpRef) SV * newRV(SV *tmpRef) { - register SV *sv; - sv = newRV_noinc(tmpRef); - SvREFCNT_inc(tmpRef); - return sv; + return newRV_noinc(SvREFCNT_inc(tmpRef)); } /* make an exact duplicate of old */ |