]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Fix large memory leak introduced in the r4915 bidi changes.
authorSimon Tatham <anakin@pobox.com>
Tue, 30 Nov 2004 13:39:58 +0000 (13:39 +0000)
committerSimon Tatham <anakin@pobox.com>
Tue, 30 Nov 2004 13:39:58 +0000 (13:39 +0000)
[originally from svn r4936]
[r4915 == 569da2eb7bb5ac863946ba5c3775284a72ddeb94]

terminal.c

index aa2319628147945810b27509d773aded101d90ce..5de2e4befea1e435194b36abee982bdca0556481 100644 (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);