summaryrefslogtreecommitdiffstats
path: root/strings.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-01-06 15:49:44 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-01-06 15:49:44 +0000
commitb7ba0decc3a3349611b6f43d72d947e89d4c2d67 (patch)
treea542a4fcc8b66a1d442c9d5ce783ed4b88b645de /strings.c
parent0a1a67c2c7759505f69bf1127a57b5232a7f84bd (diff)
downloadmandoc-b7ba0decc3a3349611b6f43d72d947e89d4c2d67.tar.gz
Memory leak, some mdoc(7) conformities.
Diffstat (limited to 'strings.c')
-rw-r--r--strings.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/strings.c b/strings.c
index da8a0ca5..0a30ecfe 100644
--- a/strings.c
+++ b/strings.c
@@ -133,6 +133,8 @@ mdoc_atotime(const char *p)
{
struct tm tm;
+ (void)memset(&tm, 0, sizeof(struct tm));
+
if (strptime(p, "%b %d %Y", &tm))
return(mktime(&tm));
if (strptime(p, "%b %d, %Y", &tm))