mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 09:58:01 +00:00
Memory leak fixes reported by Balazs Domjan.
[originally from svn r9645]
This commit is contained in:
parent
b631c1e18e
commit
8acd57afb5
@ -1619,10 +1619,14 @@ void term_free(Terminal *term)
|
|||||||
for (i = 0; i < term->bidi_cache_size; i++) {
|
for (i = 0; i < term->bidi_cache_size; i++) {
|
||||||
sfree(term->pre_bidi_cache[i].chars);
|
sfree(term->pre_bidi_cache[i].chars);
|
||||||
sfree(term->post_bidi_cache[i].chars);
|
sfree(term->post_bidi_cache[i].chars);
|
||||||
|
sfree(term->post_bidi_cache[i].forward);
|
||||||
|
sfree(term->post_bidi_cache[i].backward);
|
||||||
}
|
}
|
||||||
sfree(term->pre_bidi_cache);
|
sfree(term->pre_bidi_cache);
|
||||||
sfree(term->post_bidi_cache);
|
sfree(term->post_bidi_cache);
|
||||||
|
|
||||||
|
sfree(term->tabs);
|
||||||
|
|
||||||
expire_timer_context(term);
|
expire_timer_context(term);
|
||||||
|
|
||||||
conf_free(term->conf);
|
conf_free(term->conf);
|
||||||
@ -1711,7 +1715,8 @@ void term_size(Terminal *term, int newrows, int newcols, int newsavelines)
|
|||||||
while (term->rows > newrows) {
|
while (term->rows > newrows) {
|
||||||
if (term->curs.y < term->rows - 1) {
|
if (term->curs.y < term->rows - 1) {
|
||||||
/* delete bottom row, unless it contains the cursor */
|
/* delete bottom row, unless it contains the cursor */
|
||||||
sfree(delpos234(term->screen, term->rows - 1));
|
line = delpos234(term->screen, term->rows - 1);
|
||||||
|
freeline(line);
|
||||||
} else {
|
} else {
|
||||||
/* push top row to scrollback */
|
/* push top row to scrollback */
|
||||||
line = delpos234(term->screen, 0);
|
line = delpos234(term->screen, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user