diff options
author | fvogel <fvogelnew1@free.fr> | 2017-03-29 20:02:38 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2017-03-29 20:02:38 (GMT) |
commit | bec073280438947bc41ae54d977899ea3adc5575 (patch) | |
tree | 28ea6b639c7d20a8f666a04b46453afa704c87de | |
parent | 7a892ab92c992f465d16f046efff8e5df3266d1b (diff) | |
parent | b067e33b380775ccdb269def17dfb8699f22bf5a (diff) | |
download | tk-bec073280438947bc41ae54d977899ea3adc5575.zip tk-bec073280438947bc41ae54d977899ea3adc5575.tar.gz tk-bec073280438947bc41ae54d977899ea3adc5575.tar.bz2 |
Fix [28a3c366e6]: memory leak in the text widget. Patch contributed anonymously
-rw-r--r-- | generic/tkTextBTree.c | 3 |
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; } |