projects
/
suckless
/
slstatus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a8d5bde
)
fixed memleak in datetime()
author
Aaron Marcher
<info@nulltime.net>
Mon, 15 Aug 2016 10:43:43 +0000
(12:43 +0200)
committer
Aaron Marcher (drkhsh)
<info@nulltime.net>
Mon, 15 Aug 2016 10:43:43 +0000
(12:43 +0200)
slstatus.c
patch
|
blob
|
history
diff --git
a/slstatus.c
b/slstatus.c
index c56efd9094cd5ea73058e24435efbfe4535b030d..6ffc8e0f554c12c7ee8800763506767538f54342 100644
(file)
--- 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");
}