From: Jarkko Hietaniemi Date: Wed, 2 May 2001 17:14:00 +0000 (+0000) Subject: Fix for a segfault, from Marc Lehmann. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bf8afc63e607fcc7c1b66ceb8d1c6a9f20862f5b;p=p5sagit%2Fp5-mst-13.2.git Fix for a segfault, from Marc Lehmann. p4raw-id: //depot/perl@9962 --- diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index 6968835..842131e 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -3678,7 +3678,7 @@ strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1) char *buf = my_strftime(fmt, sec, min, hour, mday, mon, year, wday, yday, isdst); if (buf) { ST(0) = sv_2mortal(newSVpv(buf, 0)); - free(buf); + Safefree(buf); } } diff --git a/ext/Time/Piece/Piece.xs b/ext/Time/Piece/Piece.xs index 04008d8..a639af5 100644 --- a/ext/Time/Piece/Piece.xs +++ b/ext/Time/Piece/Piece.xs @@ -30,6 +30,6 @@ __strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = - char *buf = my_strftime(fmt, sec, min, hour, mday, mon, year, wday, yday, isdst); if (buf) { ST(0) = sv_2mortal(newSVpv(buf, 0)); - free(buf); + Safefree(buf); } }