aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit1c8d0e7cfcdbd3d64368314aed6b31f07872e336 (patch)
tree7e602d632c430490e38892f970ec3bb374bfccea /strings.c
parent1d26ffbd16140a752b2adcc259c2957382a4becc (diff)
downloadmandoc-1c8d0e7cfcdbd3d64368314aed6b31f07872e336.tar.gz
mandoc-1c8d0e7cfcdbd3d64368314aed6b31f07872e336.tar.zst
mandoc-1c8d0e7cfcdbd3d64368314aed6b31f07872e336.zip
Memory leak, some mdoc(7) conformities.
Diffstat (limited to 'strings.c')
-rw-r--r--strings.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/strings.c b/strings.c
index da83b555..3b10c770 100644
--- a/strings.c
+++ b/strings.c
@@ -1,4 +1,4 @@
-/* $Id: strings.c,v 1.4 2008/12/29 18:08:44 kristaps Exp $ */
+/* $Id: strings.c,v 1.5 2009/01/06 15:49:44 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -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))