From 086a70cde0a887a55d5554109e483c19bc6ad8c2 Mon Sep 17 00:00:00 2001 From: Aaron Marcher Date: Mon, 15 Aug 2016 12:43:43 +0200 Subject: [PATCH] fixed memleak in datetime() --- slstatus.c | 1 + 1 file changed, 1 insertion(+) 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"); }