diff --git a/WPrefs.app/Menu.c b/WPrefs.app/Menu.c index 7780df14..85639b05 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; }