The problem here is that the test comparing the title strings
does not take into account the possibility that the new string
may have the same contents as the old string. The new string
gets into the widget and is free'd by the calling code. Also,
the title string wasn't being deallocated on widget destroy.
- Steve
*** lesstif-0.91.3/lib/Xm/BulletinBoard.c.orig Mon Jan 10 08:35:08 2000
--- lesstif-0.91.3/lib/Xm/BulletinBoard.c Thu Jul 20 17:18:43 2000
***************
*** 577,582 ****
--- 577,585 ----
DEBUGOUT(XdbDebug("RWS", w,"%s:destroy(%d)\n",
__FILE__, __LINE__
));
+
+ if (BB_DialogTitle(w))
+ XmStringFree(BB_DialogTitle(w));
XmFontListFree(BB_LabelFontList(w));
XmFontListFree(BB_ButtonFontList(w));
XmFontListFree(BB_TextFontList(w));
***************
*** 651,656 ****
--- 654,664 ----
BB_DialogTitle(new_w) = XmStringCopy(BB_DialogTitle(new_w));
}
+ XmStringFree(BB_DialogTitle(old));
+ }
+ else if (BB_DialogTitle(old) != BB_DialogTitle(new_w))
+ {
+ BB_DialogTitle(new_w) = XmStringCopy(BB_DialogTitle(new_w));
XmStringFree(BB_DialogTitle(old));
}
--== Sent via Deja.com http://www.deja.com/ ==--
Before you buy.