Make op/sprintf.t more comprehensive, take 2
[p5sagit/p5-mst-13.2.git] / pp_hot.c
index d45adca..6df5420 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2267,7 +2267,9 @@ S_get_db_sub(pTHX_ SV **svp, CV *cv)
                    && (gv = (GV*)*svp) ))) {
            /* Use GV from the stack as a fallback. */
            /* GV is potentially non-unique, or contain different CV. */
-           sv_setsv(dbsv, newRV((SV*)cv));
+           SV *tmp = newRV((SV*)cv));
+           sv_setsv(dbsv, tmp);
+           SvREFCNT_dec(tmp);
        }
        else {
            gv_efullname3(dbsv, gv, Nullch);