diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2017-04-02 18:13:36 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2017-04-02 18:13:36 (GMT) |
commit | 42a6720b787872f2690c7add6df4b877a2c34d36 (patch) | |
tree | ef99a547247429d992009a5a182a7b1d928ee05d /tk8.6/macosx | |
parent | 4f54d474a1792c52f1a156354e132b799edb7c6d (diff) | |
download | blt-42a6720b787872f2690c7add6df4b877a2c34d36.zip blt-42a6720b787872f2690c7add6df4b877a2c34d36.tar.gz blt-42a6720b787872f2690c7add6df4b877a2c34d36.tar.bz2 |
plug mem leak
Diffstat (limited to 'tk8.6/macosx')
-rw-r--r-- | tk8.6/macosx/tkMacOSXWm.c | 3 | ||||
-rw-r--r-- | tk8.6/macosx/tkMacOSXWm.h | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tk8.6/macosx/tkMacOSXWm.c b/tk8.6/macosx/tkMacOSXWm.c index ac5f43d..3fb1a4f 100644 --- a/tk8.6/macosx/tkMacOSXWm.c +++ b/tk8.6/macosx/tkMacOSXWm.c @@ -2893,13 +2893,14 @@ WmProtocolCmd( } else { prevPtr->nextPtr = protPtr->nextPtr; } + if (protPtr->command) + ckfree(protPtr->command); Tcl_EventuallyFree(protPtr, TCL_DYNAMIC); break; } } cmd = Tcl_GetStringFromObj(objv[4], &cmdLength); if (cmdLength > 0) { - /* protPtr = ckalloc(HANDLER_SIZE(cmdLength));*/ protPtr = ckalloc(sizeof(ProtocolHandler)); protPtr->protocol = protocol; protPtr->nextPtr = wmPtr->protPtr; diff --git a/tk8.6/macosx/tkMacOSXWm.h b/tk8.6/macosx/tkMacOSXWm.h index b504896..7799c32 100644 --- a/tk8.6/macosx/tkMacOSXWm.h +++ b/tk8.6/macosx/tkMacOSXWm.h @@ -29,7 +29,6 @@ typedef struct ProtocolHandler { * same top-level window, or NULL for end of * list. */ Tcl_Interp *interp; /* Interpreter in which to invoke command. */ - /* char command[4]; Tcl command to invoke when a client message*/ char* command; /* Tcl command to invoke when a client message * for this protocol arrives. The actual size * of the structure varies to accommodate the |