diff options
author | Tony Cook <tony@develop-help.com> | 2010-07-11 21:23:30 +1000 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2010-07-11 21:23:30 +1000 |
commit | c4bc4aaaeaf5ebf3d6c5758fe61c1f0dd3864b9a (patch) | |
tree | d5e8cebb369576d30a438a89f4137a6e907aac54 | |
parent | 86755f4c6f582e5c7a061c052ee0ab93941a9733 (diff) | |
download | perl-c4bc4aaaeaf5ebf3d6c5758fe61c1f0dd3864b9a.tar.gz |
RT #73520: POSIX::strftime memory leak
Tested before/after with valgrind.
-rw-r--r-- | util.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) |