From: simon Date: Tue, 30 Nov 2004 13:39:58 +0000 (+0000) Subject: Fix large memory leak introduced in the r4915 bidi changes. X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/9e7c372cf496832b64aa375949301f2f3d6fa33a Fix large memory leak introduced in the r4915 bidi changes. git-svn-id: svn://svn.tartarus.org/sgt/putty@4936 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/terminal.c b/terminal.c index aa231962..5de2e4be 100644 --- a/terminal.c +++ b/terminal.c @@ -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);