diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2014-07-12 16:15:22 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2014-07-12 16:15:22 (GMT) |
commit | 985b5f8a7463d8ef8400d49bceb87b402ed70e59 (patch) | |
tree | 488c380d0ec7f4f0e06a4eda59cfddabf2bcc0e3 /unix | |
parent | 7bea42569d8c2ccb8584155f706392d5812ec428 (diff) | |
parent | 74d71bafde63ca49cecadc990df7b3a2d7797849 (diff) | |
download | tcl-bug_d5ddbc7f49.zip tcl-bug_d5ddbc7f49.tar.gz tcl-bug_d5ddbc7f49.tar.bz2 |
merge trunkbug_d5ddbc7f49
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tclUnixPipe.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c index a02044e..95bc8d1 100644 --- a/unix/tclUnixPipe.c +++ b/unix/tclUnixPipe.c @@ -229,7 +229,7 @@ TclpCreateTempFile( Tcl_Obj * TclpTempFileName(void) { - Tcl_Obj *nameObj = Tcl_NewObj(); + Tcl_Obj *retVal, *nameObj = Tcl_NewObj(); int fd; Tcl_IncrRefCount(nameObj); @@ -242,7 +242,9 @@ TclpTempFileName(void) fcntl(fd, F_SETFD, FD_CLOEXEC); TclpObjDeleteFile(nameObj); close(fd); - return nameObj; + retVal = Tcl_DuplicateObj(nameObj); + Tcl_DecrRefCount(nameObj); + return retVal; } /* |