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:
86755f4
)
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
Tony Cook
<tony@develop-help.com>
Sun, 11 Jul 2010 11:23:30 +0000
(21:23 +1000)
Tested before/after with valgrind.
util.c
patch
|
blob
|
history
diff --git
a/util.c
b/util.c
index
652e868
..
b3b385e
100644
(file)
--- 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)