summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2010-07-11 21:23:30 +1000
committerTony Cook <tony@develop-help.com>2010-07-11 21:23:30 +1000
commitc4bc4aaaeaf5ebf3d6c5758fe61c1f0dd3864b9a (patch)
treed5e8cebb369576d30a438a89f4137a6e907aac54 /util.c
parent86755f4c6f582e5c7a061c052ee0ab93941a9733 (diff)
downloadperl-c4bc4aaaeaf5ebf3d6c5758fe61c1f0dd3864b9a.tar.gz
RT #73520: POSIX::strftime memory leak
Tested before/after with valgrind.
Diffstat (limited to 'util.c')
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index 652e868b6d..b3b385e2cc 100644
--- a/util.c
+++ b/util.c
@@ -4234,7 +4234,7 @@ Perl_my_strftime(pTHX_ const char *fmt, int sec, int min, int hour, int mday, in
const int fmtlen = strlen(fmt);
int bufsize = fmtlen + buflen;
- Newx(buf, bufsize, char);
+ Renew(buf, bufsize, char);
while (buf) {
buflen = strftime(buf, bufsize, fmt, &mytm);
if (buflen > 0 && buflen < bufsize)