Tcl Source Code

Check-in [355146f0e0]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Missed a cleanup line, which created a memleak.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dgp-ecr
Files: files | file ages | folders
SHA1: 355146f0e06198abef969a5c0af41c5b6a868cea
User & Date: dgp 2016-07-07 19:50:02
Context
2016-07-08
14:19
Repair some memory corruption problems in EnsembleCmdRep. check-in: 65348900a8 user: dgp tags: core-8-6-branch
2016-07-07
19:50
Missed a cleanup line, which created a memleak. Closed-Leaf check-in: 355146f0e0 user: dgp tags: dgp-ecr
18:44
To use a Tcl_Command token [aka (Command *)] for epoch checking, we must not permit it to be freed w... check-in: c8510ad941 user: dgp tags: dgp-ecr
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclEnsemble.c.

2380
2381
2382
2383
2384
2385
2386

2387
2388
2389
2390
2391
2392
2393
    Tcl_HashEntry *hPtr,
    Tcl_Obj *fix)
{
    register EnsembleCmdRep *ensembleCmd;

    if (objPtr->typePtr == &ensembleCmdType) {
	ensembleCmd = objPtr->internalRep.twoPtrValue.ptr1;

	if (ensembleCmd->fix) {	
	    Tcl_DecrRefCount(ensembleCmd->fix);
	}
    } else {
	/*
	 * Kill the old internal rep, and replace it with a brand new one of
	 * our own.






>







2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
    Tcl_HashEntry *hPtr,
    Tcl_Obj *fix)
{
    register EnsembleCmdRep *ensembleCmd;

    if (objPtr->typePtr == &ensembleCmdType) {
	ensembleCmd = objPtr->internalRep.twoPtrValue.ptr1;
	TclCleanupCommandMacro(ensembleCmd->token);
	if (ensembleCmd->fix) {	
	    Tcl_DecrRefCount(ensembleCmd->fix);
	}
    } else {
	/*
	 * Kill the old internal rep, and replace it with a brand new one of
	 * our own.