summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--slstatus.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/slstatus.c b/slstatus.c
index c56efd9..6ffc8e0 100644
--- a/slstatus.c
+++ b/slstatus.c
@@ -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");
}