summaryrefslogtreecommitdiffstats
path: root/src/if_perl.xs
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-04-15 21:16:11 +0200
committerBram Moolenaar <Bram@vim.org>2016-04-15 21:16:11 +0200
commit95509e18f8806046eeee27482c77666bbec515da (patch)
tree3e84cc9c20ee5e87834757e782b46b5b3ae04338 /src/if_perl.xs
parent5d98c9d93278d6961bfee59151666b8a8bcd23c3 (diff)
patch 7.4.1746v7.4.1746
Problem: Memory leak in Perl. Solution: Decrement the reference count. Add a test. (Damien)
Diffstat (limited to 'src/if_perl.xs')
-rw-r--r--src/if_perl.xs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/if_perl.xs b/src/if_perl.xs
index b091bf7cab..23246a57b1 100644
--- a/src/if_perl.xs
+++ b/src/if_perl.xs
@@ -844,6 +844,7 @@ I32 cur_val(IV iv, SV *sv)
else
rv = newBUFrv(newSV(0), curbuf);
sv_setsv(sv, rv);
+ SvREFCNT_dec(SvRV(rv));
return 0;
}
#endif /* !PROTO */