mirror of
https://github.com/pikami/slstatus.git
synced 2024-11-27 13:55:41 +00:00
fixed memleak in datetime()
This commit is contained in:
parent
a8d5bde6a5
commit
086a70cde0
@ -160,6 +160,7 @@ datetime(const char *timeformat)
|
||||
setlocale(LC_TIME, "");
|
||||
if(!strftime(buf, bufsize, timeformat, localtime(&tm))) {
|
||||
setlocale(LC_TIME, "C");
|
||||
free(buf);
|
||||
fprintf(stderr, "Strftime failed.\n");
|
||||
return smprintf("n/a");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user