From 1c8d0e7cfcdbd3d64368314aed6b31f07872e336 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Tue, 6 Jan 2009 15:49:44 +0000 Subject: Memory leak, some mdoc(7) conformities. --- strings.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'strings.c') 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 * @@ -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)) -- cgit v1.2.3