projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b7561fc
)
PerlIO_tmpfile: Don't leak an SV
author
Brian Fraser
<fraserbn@gmail.com>
Wed, 22 Jan 2014 01:46:10 +0000
(22:46 -0300)
committer
Brian Fraser
<fraserbn@gmail.com>
Wed, 22 Jan 2014 02:21:07 +0000
(23:21 -0300)
This was spotted by Daniel Dragan on the thread for #120591
perlio.c
patch
|
blob
|
history
diff --git
a/perlio.c
b/perlio.c
index
ec19bfe
..
07de32a
100644
(file)
--- a/
perlio.c
+++ b/
perlio.c
@@
-4967,6
+4967,7
@@
PerlIO_tmpfile(void)
fd = mkstemp(SvPVX(sv));
}
if (fd < 0) {
+ SvREFCNT_dec(sv);
sv = NULL;
/* else we try /tmp */
fd = mkstemp(tempname);