diff options
Diffstat (limited to 'generic/tclListObj.c')
-rw-r--r-- | generic/tclListObj.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/generic/tclListObj.c b/generic/tclListObj.c index 1166759..97e7152 100644 --- a/generic/tclListObj.c +++ b/generic/tclListObj.c @@ -906,6 +906,9 @@ Tcl_ListObjReplace( listRepPtr = AttemptNewList(interp, newMax, NULL); if (listRepPtr == NULL) { + for (i = 0; i < objc; i++) { + objv[i]->refCount--; + } return TCL_ERROR; } |