From 2706f7217ca6812e3341220697f455fa2e47119e Mon Sep 17 00:00:00 2001 From: Pedro Martelletto 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/ports@openbsd.org/msg12731.html [crmafra: small changes in the commit log from the webpage] --- WPrefs.app/Menu.c | 1 - 1 file changed, 1 deletion(-) diff --git a/WPrefs.app/Menu.c b/WPrefs.app/Menu.c index f27159fc..dd7c30f7 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]; -- 2.11.4.GIT