projects
/
p5sagit/p5-mst-13.2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Document and test Time::Piece.
[p5sagit/p5-mst-13.2.git]
/
ext
/
POSIX
/
POSIX.xs
diff --git
a/ext/POSIX/POSIX.xs
b/ext/POSIX/POSIX.xs
index
3e273b0
..
39d6f40
100644
(file)
--- a/
ext/POSIX/POSIX.xs
+++ b/
ext/POSIX/POSIX.xs
@@
-3666,8
+3666,10
@@
strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1)
CODE:
{
char *buf = my_strftime(fmt, sec, min, hour, mday, mon, year, wday, yday, isdst);
- ST(0) = sv_2mortal(newSVpv(buf, 0));
- free(buf);
+ if (buf) {
+ ST(0) = sv_2mortal(newSVpv(buf, 0));
+ free(buf);
+ }
}
void