#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>

#include <time.h>



char* check_time(int date) {

char* buf = (char*)malloc(sizeof(char) * 2);

if (date > 9) {

sprintf(buf, "%d", date);

return buf;

}

else {

sprintf(buf, "0%d", date);

return buf;

}

}

int main() {

time_t curr;

struct tm* d;

curr = time(NULL);

d = localtime(&curr);


char datetime[20];

sprintf(datetime, "%d/%s/%s %s:%s:%s", d->tm_year + 1900, check_time(d->tm_mon + 1), check_time(d->tm_mday), check_time(d->tm_hour), check_time(d->tm_min), check_time(d->tm_sec));

printf("%s",datetime);

}


도움 받아서 이렇게 수정 했는데

누수는 무슨얘기인가요??