mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-24 07:02:30 +01:00
util: remove unnecesary allocation in addWMMenuEntryCallback (Coverity #50161)
As pointed by Coverity, the string passed to 'findPositionInMenu' is not freed, and as the function does not modify it it is not necessary to allocate a new storage for the argument. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
75511e2ec8
commit
f2a7f233e3
@@ -175,7 +175,7 @@ static void addWMMenuEntryCallback(WMMenuEntry *aEntry)
|
||||
}
|
||||
|
||||
if (aEntry->SubMenu)
|
||||
at = findPositionInMenu(wstrdup(aEntry->SubMenu));
|
||||
at = findPositionInMenu(aEntry->SubMenu);
|
||||
|
||||
if (!at)
|
||||
at = menu;
|
||||
|
||||
Reference in New Issue
Block a user