diff options
author | Brian Fraser <fraserbn@gmail.com> | 2014-01-21 22:46:10 -0300 |
---|---|---|
committer | Brian Fraser <fraserbn@gmail.com> | 2014-01-21 23:21:07 -0300 |
commit | e40f8e806ef39ca48d2e94f25d2b6c5f63b4efda (patch) | |
tree | 519d6a3b026fcb1cb4f5228bfe3cfeb5dafb407b /perlio.c | |
parent | b7561fc9bc645b8c7e0e9ebbb29349113cb716c1 (diff) | |
download | perl-e40f8e806ef39ca48d2e94f25d2b6c5f63b4efda.tar.gz |
PerlIO_tmpfile: Don't leak an SV
This was spotted by Daniel Dragan on the thread for #120591
Diffstat (limited to 'perlio.c')
-rw-r--r-- | perlio.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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); |