From 45e7a846bf0b5457caf82ee49e52489bc882c1b9 Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Mon, 23 Apr 2001 18:22:33 +0000 Subject: [PATCH] We must not free the pointer returned by localtime (especially not with MSVCRT_free!). We no longer need to include stdlib.h. --- dlls/msvcrt/time.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/msvcrt/time.c b/dlls/msvcrt/time.c index c2f3d573259..9580ada5a1b 100644 --- a/dlls/msvcrt/time.c +++ b/dlls/msvcrt/time.c @@ -6,11 +6,11 @@ * Copyright 1997,2000 Uwe Bonnes * Copyright 2000 Jon Griffiths */ + #include #include -#include "msvcrt.h" -#include "msvcrt/stdlib.h" +#include "msvcrt.h" #include "msvcrt/sys/timeb.h" #include "msvcrt/time.h" @@ -29,8 +29,6 @@ char* msvcrt_get_current_time(char* out, const char* format) if (time(&t) != bad_time && (_tm = localtime(&t)) && strftime(out,9,format,_tm) == 8) retval = out; - if (_tm) - MSVCRT_free(_tm); return retval; }