summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2017-03-26 08:59:56 (GMT)
committerfvogel <fvogelnew1@free.fr>2017-03-26 08:59:56 (GMT)
commit0d6bc195bb0910c5dee78b223c40dc48c0c1eadb (patch)
treecd02ba8b3bf748084b4677e3e1555c7292720a9c /generic
parent8fdc028695a4f4fe332705350cc3ee62fe9f14cb (diff)
downloadtk-0d6bc195bb0910c5dee78b223c40dc48c0c1eadb.zip
tk-0d6bc195bb0910c5dee78b223c40dc48c0c1eadb.tar.gz
tk-0d6bc195bb0910c5dee78b223c40dc48c0c1eadb.tar.bz2
Fix [28a3c366e6]: memory leak in the text widget. Patch contributed anonymously
Diffstat (limited to 'generic')
-rw-r--r--generic/tkTextBTree.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/generic/tkTextBTree.c b/generic/tkTextBTree.c
index 0fdc280..db0d71a 100644
--- a/generic/tkTextBTree.c
+++ b/generic/tkTextBTree.c
@@ -1439,6 +1439,7 @@ TkBTreeDeleteIndexRange(
prevNodePtr->nextPtr = curNodePtr->nextPtr;
}
parentPtr->numChildren--;
+ ckfree(curNodePtr->numPixels);
ckfree(curNodePtr);
curNodePtr = parentPtr;
}
@@ -4185,6 +4186,7 @@ Rebalance(
treePtr->rootPtr = nodePtr->children.nodePtr;
treePtr->rootPtr->parentPtr = NULL;
DeleteSummaries(nodePtr->summaryPtr);
+ ckfree(nodePtr->numPixels);
ckfree(nodePtr);
}
return;
@@ -4274,6 +4276,7 @@ Rebalance(
nodePtr->nextPtr = otherPtr->nextPtr;
nodePtr->parentPtr->numChildren--;
DeleteSummaries(otherPtr->summaryPtr);
+ ckfree(otherPtr->numPixels);
ckfree(otherPtr);
continue;
}