summaryrefslogtreecommitdiffstats
path: root/win/tkWinSend.c
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2003-11-08 22:53:01 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2003-11-08 22:53:01 (GMT)
commitc66a7d3bb4246fb87bee78179790edbfd73b7785 (patch)
treeaeea7e4a3b7904e1f51cc31623ea6ecded80610b /win/tkWinSend.c
parent2551f96c4652be256bc2480e4fcc05c7065f6665 (diff)
downloadtk-c66a7d3bb4246fb87bee78179790edbfd73b7785.zip
tk-c66a7d3bb4246fb87bee78179790edbfd73b7785.tar.gz
tk-c66a7d3bb4246fb87bee78179790edbfd73b7785.tar.bz2
Fixed an error in returning the name actually registered for 'send'.
Diffstat (limited to 'win/tkWinSend.c')
-rw-r--r--win/tkWinSend.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/win/tkWinSend.c b/win/tkWinSend.c
index 14a23c8..fcd6b4c 100644
--- a/win/tkWinSend.c
+++ b/win/tkWinSend.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinSend.c,v 1.5 2003/10/08 21:49:57 patthoyts Exp $
+ * RCS: @(#) $Id: tkWinSend.c,v 1.6 2003/11/08 22:53:01 patthoyts Exp $
*/
#include "tkPort.h"
@@ -585,11 +585,11 @@ RegisterInterp(CONST char *name, RegisteredInterp *riPtr)
int i, offset;
CONST char *actualName = name;
Tcl_DString dString;
-
+ Tcl_DStringInit(&dString);
+
hr = GetRunningObjectTable(0, &pROT);
if (SUCCEEDED(hr)) {
- Tcl_DStringInit(&dString);
offset = 0;
for (i = 1; SUCCEEDED(hr); i++) {
@@ -621,12 +621,13 @@ RegisterInterp(CONST char *name, RegisteredInterp *riPtr)
break;
}
- Tcl_DStringFree(&dString);
pROT->lpVtbl->Release(pROT);
}
if (SUCCEEDED(hr))
riPtr->name = strdup(actualName);
+
+ Tcl_DStringFree(&dString);
return hr;
}