[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: 3.0.18 update



>I just mailed an update to 124117, what is hopefully the last terrible
>bug facing 3.0.18.  You should be able to reproduce it in the comfort
>of your own home directory.  I included a hackish fix as well.  Maybe
>someone wiill figure out what is really going on but I need some
>sleep.

I think the bug was introduced in the last newt upload.

  * Fix memory leak in newtTextboxSetText. (Closes: #121505)

Here's a patch to revert that change.

--- newt-0.50.17/textbox.c	Tue Dec 18 12:16:55 2001
+++ newt-0.50.17.pb/textbox.c	Mon Nov 12 20:37:26 2001
@@ -370,11 +370,10 @@
     const char * start, * end;
     struct textbox * tb = co->data;
     char * reflowed, * expanded;
-    int i, badness, height;
+    int badness, height;
 
     if (tb->lines) {
-	for (i = 0; i < tb->numLines; i++)
-	    free(tb->lines);
+	free(tb->lines);
 	tb->linesAlloced = tb->numLines = 0;
     }

p.




Reply to: