diff options
author | dkf <dkf@noemail.net> | 2004-02-25 14:54:35 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2004-02-25 14:54:35 (GMT) |
commit | 4efd16fe32eff600117122a8e39de2dc64a34101 (patch) | |
tree | 389e81622a78097fcdbd191f8591642fbfbf90a5 /unix/tclUnixChan.c | |
parent | e89674e862b6184471fd0bddef4d39e5837a5d8f (diff) | |
download | tcl-4efd16fe32eff600117122a8e39de2dc64a34101.zip tcl-4efd16fe32eff600117122a8e39de2dc64a34101.tar.gz tcl-4efd16fe32eff600117122a8e39de2dc64a34101.tar.bz2 |
Fix memleak with long hostnames. [Bug 888777]
FossilOrigin-Name: f64c6d79f4e2573db1e7fc0aa7d1047ca8cc5f47
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 7b6f59f..794e8dd 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.42.2.1 2003/10/23 17:49:06 andreas_kupries Exp $ + * RCS: @(#) $Id: tclUnixChan.c,v 1.42.2.2 2004/02/25 14:54:52 dkf Exp $ */ #include "tclInt.h" /* Internal definitions for Tcl. */ @@ -2289,6 +2289,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)); } @@ -2335,6 +2336,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)); } |