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>
This commit is contained in:
Vlad Glagolev 2016-10-12 15:57:12 -04:00 committed by Lukas Fleischer
parent 32dcdff20b
commit da6334cf38

View File

@ -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");