summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclClock.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/generic/tclClock.c b/generic/tclClock.c
index e1c70e9..4389e16 100644
--- a/generic/tclClock.c
+++ b/generic/tclClock.c
@@ -3634,7 +3634,8 @@ ClockScanObjCmd(
Tcl_SetObjResult(interp,
Tcl_NewStringObj("legacy [clock scan] does not support -locale", -1));
Tcl_SetErrorCode(interp, "CLOCK", "flagWithLegacyFormat", NULL);
- return TCL_ERROR;
+ ret = TCL_ERROR;
+ goto done;
}
ret = ClockFreeScan(&yy, objv[1], &opts);
}
@@ -3657,9 +3658,9 @@ ClockScanObjCmd(
/* Apply validation rules, if expected */
if ( (opts.flags & CLF_VALIDATE) ) {
- if (ClockValidDate(&yy, &opts,
- opts.formatObj == NULL ? 2 : 3) != TCL_OK) {
- return TCL_ERROR;
+ ret = ClockValidDate(&yy, &opts, opts.formatObj == NULL ? 2 : 3);
+ if (ret != TCL_OK) {
+ goto done;
}
}