From: Dagfinn Ilmari Mannsåker Date: Mon, 4 Aug 2014 15:13:14 +0000 (+0100) Subject: Fix leak when setting a fully-qualified name X-Git-Tag: v0.08~3^2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=85cf5faea36fd3017da852c57a42e804be210419;p=p5sagit%2FSub-Name.git Fix leak when setting a fully-qualified name --- diff --git a/Name.xs b/Name.xs index 20c9b71..5d36d14 100644 --- a/Name.xs +++ b/Name.xs @@ -59,7 +59,9 @@ subname(name, sub) } s--; if (end) { - stash = GvHV(gv_fetchpv(savepvn(name, end - name), TRUE, SVt_PVHV)); + char *namepv = savepvn(name, end - name); + stash = GvHV(gv_fetchpv(namepv, TRUE, SVt_PVHV)); + Safefree(namepv); name = end; } gv = (GV *) newSV(0);