projects
/
perl.git
/ commitdiff
free
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
082c8d2
)
RT #73520: POSIX::strftime memory leak
author
Tony Cook <tony@develop-help.com>
Sun, 11 Jul 2010 11:23:30 +0000 (21:23 +1000)
committer
Father Chrysostomos <sprout@cpan.org>
Tue, 30 Aug 2011 13:28:58 +0000 (06:28 -0700)
Tested before/after with valgrind.
(cherry picked from commit
c4bc4aaaeaf5ebf3d6c5758fe61c1f0dd3864b9a
)
util.c
patch
|
blob
|
blame
|
history
diff --git
a/util.c
b/util.c
index
89fea23
..
60225b4
100644
(file)
--- a/
util.c
+++ b/
util.c
@@
-3982,7
+3982,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)