--- CBOR-XS/XS.xs 2021/10/27 14:59:22 1.74 +++ CBOR-XS/XS.xs 2023/09/07 23:52:24 1.75 @@ -1225,7 +1225,7 @@ if (!dec->shareable || idx >= (UV)(1 + AvFILLp (dec->shareable))) ERR ("corrupted CBOR data (sharedref index out of bounds)"); - sv = SvREFCNT_inc_NN (AvARRAY (dec->shareable)[idx]); + sv = newRV_inc (AvARRAY (dec->shareable)[idx]); if (sv == &PL_sv_undef) ERR ("cyclic CBOR data structure found, but allow_cycles is not enabled");