From: Christophe CURIS <[email protected]>
This allocation was certainly participating to memory fragmentation.
---
WPrefs.app/Menu.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/WPrefs.app/Menu.c b/WPrefs.app/Menu.c
index 7780df1..85639b0 100644
--- a/WPrefs.app/Menu.c
+++ b/WPrefs.app/Menu.c
@@ -1450,15 +1450,9 @@ static void buildMenuFromPL(_Panel * panel, WMPropList *
pl)
static WMPropList *getDefaultMenu(_Panel * panel)
{
WMPropList *menu;
- char *menuPath, *gspath;
-
- gspath = wstrdup(WMAKER_RESOURCE_PATH);
-
- menuPath = wmalloc(strlen(gspath) + 128);
- sprintf(menuPath, "%s/plmenu", gspath);
+ static const char menuPath[] = WMAKER_RESOURCE_PATH "/plmenu";
menu = WMReadPropListFromFile(menuPath);
-
if (!menu) {
char *buffer, *msg;
@@ -1470,9 +1464,6 @@ static WMPropList *getDefaultMenu(_Panel * panel)
wfree(buffer);
}
- wfree(gspath);
- wfree(menuPath);
-
return menu;
}
--
1.7.10.4
--
To unsubscribe, send mail to [email protected].