On Wed 10.Dec'08 at 21:55:48 +0100, Gilbert wrote: > Hello John, > I forgot to remind you incase you didn't see the email from a couple of > days ago -do *not* include patch number 9 from the original series I > submitted. > It crashes the WPrefs.app when the menu editor panel is selected.
I found the fix for it in the OpenBSD repository, see attached patch by Pedro Martelletto. > The original > author claimed that it fixed ammeory leak when staring multiple items from > the menu. The author (Tobias Stoeckmann) was right about the memory leak, but the wtokenfree() is only called from dock.c and WPrefs/Menu.c, so the leak does not happen by openning items from the menu, but when executing dockapps. I tried the patch below and it fixed the issue. So I think that both patches must go in the stable repo... @Gilbert: Can you test it too? Regards, Carlos PS: It won't apply in the mercurial I guess, unfortunately. But I wanted to raise awareness for the existence of the fix. From: Pedro Martelletto <[email protected]> Date: Fri, 17 Aug 2007 10:43:25 -0700 Subject: [PATCH] WPrefs: Fix crash due to wtokenfree() memory leak fix After the fix to avoid a memory leak in wtokenfree(), WPrefs crashes when opening the 'Applications Menu Definition' dialogue. The problem is that WPrefs code relied on the fact that the first token in the array would not be free'd by wtokenfree(), a misbehaviour which is correctly addressed with this patch. Retrieved-from: http://www.mail-archive.com/[email protected]/msg12731.html [crmafra: small changes in the commit log from the webpage] --- WPrefs.app/Menu.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/WPrefs.app/Menu.c b/WPrefs.app/Menu.c index f27159f..dd7c30f 100644 --- a/WPrefs.app/Menu.c +++ b/WPrefs.app/Menu.c @@ -981,7 +981,6 @@ static ItemData *parseCommand(WMPropList * item) for (i = 0, j = 0; i < tokn; i++) { if (strcmp(tokens[i], "-noext") == 0) { - wfree(tokens[i]); data->param.directory.stripExt = 1; } else { ctokens[j++] = tokens[i]; -- 1.6.4.183.g04423 -- To unsubscribe, send mail to [email protected].
