projects
/
p5sagit/Sub-Name.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
988a6b1
)
Fix leak when setting a fully-qualified name
Dagfinn Ilmari Mannsåker [Mon, 4 Aug 2014 15:13:14 +0000 (16:13 +0100)]
Name.xs
patch
|
blob
|
blame
|
history
diff --git
a/Name.xs
b/Name.xs
index
20c9b71
..
5d36d14
100644
(file)
--- 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);