mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-26 16:32: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)
|
if (aEntry->SubMenu)
|
||||||
at = findPositionInMenu(wstrdup(aEntry->SubMenu));
|
at = findPositionInMenu(aEntry->SubMenu);
|
||||||
|
|
||||||
if (!at)
|
if (!at)
|
||||||
at = menu;
|
at = menu;
|
||||||
|
|||||||
Reference in New Issue
Block a user