Le Wed, 09 Jul 2008 10:27:01 +0200, Josselin Mouette <[EMAIL PROTECTED]> a écrit :
> Le lundi 07 juillet 2008 à 23:40 +0100, Alban Crequy a écrit : > > Package: libpango1.0-0 > > Version: 1.20.4-1 > > Severity: important > > > > I have random crashs on a program using pango because some memory > > allocated with g_slice_new() is freed with g_free(). > > In this case, I don’t understand your patch. Why are you turning the > g_slice_new in g_new0 instead of fixing the wrong g_free’s? There is 2 ways to fix the bug: either use g_slice functions for both allocations and releases everywhere for this varible, or use g_new0/g_free everywhere for this variable. My patch implements the second way. I thought it was not possible to use the g_slice functions because g_slice_free() wants the type as parameter. The type is not available in the file where the free is done because it is declared as static in the other file. I was not aware that g_slice_free1() exists and does not require the type. -- Alban -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]