regcomp.c: Use SvREFCNT_inc_NN()
authorKarl Williamson <khw@cpan.org>
Sun, 14 Oct 2018 21:12:41 +0000 (15:12 -0600)
committerKarl Williamson <khw@cpan.org>
Sat, 20 Oct 2018 06:09:55 +0000 (00:09 -0600)
We know this is non-null as it panics a little ways above unless that's
the case.

regcomp.c

index f4387ef..91928d3 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -11234,7 +11234,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
                         /* Yes this does cause a memory leak in debugging Perls
                          * */
                         if (!av_store(RExC_paren_name_list,
-                                      RExC_npar, SvREFCNT_inc(svname)))
+                                      RExC_npar, SvREFCNT_inc_NN(svname)))
                             SvREFCNT_dec_NN(svname);
 #endif