summaryrefslogtreecommitdiffstats
path: root/generic/tclOODefineCmds.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2018-11-02 17:18:57 (GMT)
committerdgp <dgp@users.sourceforge.net>2018-11-02 17:18:57 (GMT)
commite2d299f77176b587e8995a54587bddf210af6560 (patch)
tree29b1c8abd99f4cdccd45d8d885ffbeaf80919fbc /generic/tclOODefineCmds.c
parent2577d3bd45bdf3d447208afa35b8610bd48d0674 (diff)
downloadtcl-e2d299f77176b587e8995a54587bddf210af6560.zip
tcl-e2d299f77176b587e8995a54587bddf210af6560.tar.gz
tcl-e2d299f77176b587e8995a54587bddf210af6560.tar.bz2
Fixed memory leak in TclOO.c:ObjectNamespaceDeleted, object mixins and
object/class mutation.
Diffstat (limited to 'generic/tclOODefineCmds.c')
-rw-r--r--generic/tclOODefineCmds.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/generic/tclOODefineCmds.c b/generic/tclOODefineCmds.c
index d5f4878..0271a43 100644
--- a/generic/tclOODefineCmds.c
+++ b/generic/tclOODefineCmds.c
@@ -1157,6 +1157,8 @@ TclOODefineClassObjCmd(
TclOODeleteDescendants(interp, oPtr);
oPtr->flags &= ~DONT_DELETE;
TclOOReleaseClassContents(interp, oPtr);
+ ckfree(oPtr->classPtr);
+ oPtr->classPtr = NULL;
} else if (!wasClass && willBeClass) {
TclOOAllocClass(interp, oPtr);
}