diff options
author | Aaron Marcher <info@nulltime.net> | 2016-08-15 12:43:43 +0200 |
---|---|---|
committer | Aaron Marcher (drkhsh) <info@nulltime.net> | 2016-08-15 12:43:43 +0200 |
commit | 086a70cde0a887a55d5554109e483c19bc6ad8c2 (patch) | |
tree | d271f57fd8e2170dba8735e7008e7389ed69035d | |
parent | a8d5bde6a52ed5828ff217c8276673720f897c31 (diff) |
fixed memleak in datetime()
-rw-r--r-- | slstatus.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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"); } |