1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Fix large memory leak introduced in the r4915 bidi changes.

[originally from svn r4936]
[r4915 == 569da2eb7b]
This commit is contained in:
Simon Tatham 2004-11-30 13:39:58 +00:00
parent 4cb0ead447
commit 44aca28fad

View File

@ -4389,12 +4389,18 @@ static void term_bidi_cache_store(Terminal *term, int line, termchar *lbefore,
term->post_bidi_cache[j].chars = NULL;
term->pre_bidi_cache[j].width =
term->post_bidi_cache[j].width = -1;
term->pre_bidi_cache[j].forward =
term->post_bidi_cache[j].forward = NULL;
term->pre_bidi_cache[j].backward =
term->post_bidi_cache[j].backward = NULL;
j++;
}
}
sfree(term->pre_bidi_cache[line].chars);
sfree(term->post_bidi_cache[line].chars);
sfree(term->post_bidi_cache[line].forward);
sfree(term->post_bidi_cache[line].backward);
term->pre_bidi_cache[line].width = width;
term->pre_bidi_cache[line].chars = snewn(width, termchar);