diff options
| author | griffin <briang42@easystreet.net> | 2023-05-17 16:12:25 (GMT) |
|---|---|---|
| committer | griffin <briang42@easystreet.net> | 2023-05-17 16:12:25 (GMT) |
| commit | fa313109d6a46e437c1583c859b6e79e0a6dae2a (patch) | |
| tree | 24c58bd9cb94b68f79b8f553976513202b3c9bdc /generic/tclIOGT.c | |
| parent | 6781fbdf4b3832134bd23990d3cab8b9a4c8a8fe (diff) | |
| parent | a038d4aad3a0cc42c2c3028f816f6e50443a42f1 (diff) | |
| download | tcl-fa313109d6a46e437c1583c859b6e79e0a6dae2a.zip tcl-fa313109d6a46e437c1583c859b6e79e0a6dae2a.tar.gz tcl-fa313109d6a46e437c1583c859b6e79e0a6dae2a.tar.bz2 | |
Merge trunk
Diffstat (limited to 'generic/tclIOGT.c')
| -rw-r--r-- | generic/tclIOGT.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/generic/tclIOGT.c b/generic/tclIOGT.c index 98a1dd3..2381c3c 100644 --- a/generic/tclIOGT.c +++ b/generic/tclIOGT.c @@ -379,7 +379,7 @@ ExecuteCallback( unsigned char *resBuf; Tcl_InterpState state = NULL; int res = TCL_OK; - Tcl_Obj *command = TclListObjCopy(NULL, dataPtr->command); + Tcl_Obj *command = TclDuplicatePureObj(dataPtr->command); Tcl_Interp *eval = dataPtr->interp; Tcl_Preserve(eval); @@ -397,7 +397,12 @@ ExecuteCallback( } Tcl_IncrRefCount(command); - Tcl_ListObjAppendElement(NULL, command, Tcl_NewStringObj((char *) op, -1)); + res = Tcl_ListObjAppendElement(NULL, command, Tcl_NewStringObj((char *) op, -1)); + if (res != TCL_OK) { + Tcl_DecrRefCount(command); + Tcl_Release(eval); + return res; + } /* * Use a byte-array to prevent the misinterpretation of binary data coming |
