diff options
| author | donal.k.fellows@manchester.ac.uk <dkf> | 2004-02-25 14:50:40 (GMT) | 
|---|---|---|
| committer | donal.k.fellows@manchester.ac.uk <dkf> | 2004-02-25 14:50:40 (GMT) | 
| commit | 4e34f88db04dc8f40ab130679ef5981f35e51957 (patch) | |
| tree | 8bc940cd6a3ccad13526413d5406fc4a3f89d253 /unix/tclUnixChan.c | |
| parent | 0bef13f7643fa358614fa321dfbb9dcb54f02f4f (diff) | |
| download | tcl-4e34f88db04dc8f40ab130679ef5981f35e51957.zip tcl-4e34f88db04dc8f40ab130679ef5981f35e51957.tar.gz tcl-4e34f88db04dc8f40ab130679ef5981f35e51957.tar.bz2  | |
Fix memleak with long hostnames. [Bug 888777]
Diffstat (limited to 'unix/tclUnixChan.c')
| -rw-r--r-- | unix/tclUnixChan.c | 4 | 
1 files changed, 3 insertions, 1 deletions
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c index 3542ca8..70a9712 100644 --- a/unix/tclUnixChan.c +++ b/unix/tclUnixChan.c @@ -10,7 +10,7 @@   * See the file "license.terms" for information on usage and redistribution   * of this file, and for a DISCLAIMER OF ALL WARRANTIES.   * - * RCS: @(#) $Id: tclUnixChan.c,v 1.45 2003/12/24 04:18:22 davygrvy Exp $ + * RCS: @(#) $Id: tclUnixChan.c,v 1.46 2004/02/25 14:50:41 dkf Exp $   */  #include "tclInt.h"	/* Internal definitions for Tcl. */ @@ -2292,6 +2292,7 @@ TcpGetOptionProc(instanceData, interp, optionName, dsPtr)  		Tcl_ExternalToUtfDString(NULL, hostEntPtr->h_name, -1, &ds);  		Tcl_DStringAppendElement(dsPtr, Tcl_DStringValue(&ds)); +		Tcl_DStringFree(&ds);  	    } else {  		Tcl_DStringAppendElement(dsPtr, inet_ntoa(peername.sin_addr));  	    } @@ -2338,6 +2339,7 @@ TcpGetOptionProc(instanceData, interp, optionName, dsPtr)  		Tcl_ExternalToUtfDString(NULL, hostEntPtr->h_name, -1, &ds);  		Tcl_DStringAppendElement(dsPtr, Tcl_DStringValue(&ds)); +		Tcl_DStringFree(&ds);  	    } else {  		Tcl_DStringAppendElement(dsPtr, inet_ntoa(sockname.sin_addr));  	    }  | 
