We must not free the pointer returned by localtime (especially not

with MSVCRT_free!).
We no longer need to include stdlib.h.
This commit is contained in:
Francois Gouget 2001-04-23 18:22:33 +00:00 committed by Alexandre Julliard
parent d1ff49d7ea
commit 45e7a846bf
1 changed files with 2 additions and 4 deletions

View File

@ -6,11 +6,11 @@
* Copyright 1997,2000 Uwe Bonnes
* Copyright 2000 Jon Griffiths
*/
#include <time.h>
#include <sys/times.h>
#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;
}