From da6334cf385ff064a8296e8c0d0e080fa2014eaa Mon Sep 17 00:00:00 2001
From: Vlad Glagolev <scm@vaygr.net>
Date: Wed, 12 Oct 2016 15:57:12 -0400
Subject: Prevent free-before-init of timstr

Fixes a crash when editing the repetition of an appointment and passing
an empty repetition value.

Signed-off-by: Vlad Glagolev <scm@vaygr.net>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
---
 src/ui-day.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src')

diff --git a/src/ui-day.c b/src/ui-day.c
index d7112af..64321a3 100644
--- a/src/ui-day.c
+++ b/src/ui-day.c
@@ -177,7 +177,7 @@ static void update_rept(struct rpt **rpt, const long start)
 {
 	int newtype, newfreq;
 	time_t newuntil;
-	char *freqstr = NULL, *timstr, *outstr;
+	char *freqstr = NULL, *timstr = NULL, *outstr;
 	const char *msg_rpt_prefix = _("Enter the new repetition type:");
 	const char *msg_rpt_daily = _("(d)aily");
 	const char *msg_rpt_weekly = _("(w)eekly");
-- 
cgit v1.2.3-70-g09d2