1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 20:38:08 +01:00

Avoid memory leak on error path in constructMenu.

This commit is contained in:
Tobias Stoeckmann
2012-05-03 17:54:13 +02:00
committed by Carlos R. Mafra
parent 753f44c4b7
commit e6e3e1aa49

View File

@@ -588,6 +588,8 @@ static void constructMenu(WMenu * menu, WMenuEntry * entry)
separateCommand((char *)entry->clientdata, &path, &cmd);
if (path == NULL || *path == NULL || **path == 0) {
wwarning(_("invalid OPEN_MENU specification: %s"), (char *)entry->clientdata);
if (cmd)
wfree(cmd);
return;
}