Sorry, this is probably a stupid question, but I couldn't find answer in the documentation for time.h
.
So when I call, for example, gmtime
time_t today;
struct tm *info;
time(&today);
info = gmtime(&today);
It returns pointer to the tm structure. I have assumed that it returns pointer to a part of memory allocated with malloc, but if I call free
for info
now - free
returns error. So how does library time.h
handles memory allocation and should I be worried about "freeing" it?