summaryrefslogtreecommitdiffstats
path: root/generic/tclCompCmds.c
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2015-07-30 22:56:57 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2015-07-30 22:56:57 (GMT)
commitb62b6bd4906dcb1c89be74a7dd5c4951f4d7da70 (patch)
tree7e15c7bb82d9f50e30ebbcb090a4de115f86e99c /generic/tclCompCmds.c
parent90beed4f41bb6f76ff5be10d80bd8c0e0e91cadb (diff)
downloadtcl-b62b6bd4906dcb1c89be74a7dd5c4951f4d7da70.zip
tcl-b62b6bd4906dcb1c89be74a7dd5c4951f4d7da70.tar.gz
tcl-b62b6bd4906dcb1c89be74a7dd5c4951f4d7da70.tar.bz2
remove unnecessary checks found by coverity
Diffstat (limited to 'generic/tclCompCmds.c')
-rw-r--r--generic/tclCompCmds.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index 6a22a30..041694f 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -2704,13 +2704,9 @@ CompileEachloopCmd(
done:
if (code == TCL_ERROR) {
- if (infoPtr) {
- FreeForeachInfo(infoPtr);
- }
- }
- if (varListObj) {
- Tcl_DecrRefCount(varListObj);
+ FreeForeachInfo(infoPtr);
}
+ Tcl_DecrRefCount(varListObj);
return code;
}