mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-21 21:38:00 +01:00
wmaker: remove unnecessary null check in readMenuDirectory (Coverity #50190)
As pointed by Coverity, the pointer cannot be null, otherwise the code would have crashed earlier. As the code seems to always set a valid pointer, there's no need to make a check there. Signed-off-by: Christophe CURIS <christophe.curis@free.fr> Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
This commit is contained in:
committed by
Carlos R. Mafra
parent
de5ef8c4f1
commit
7013b72dce
@@ -1359,8 +1359,7 @@ static WMenu *readMenuDirectory(WScreen *scr, const char *title, char **path, co
|
||||
addMenuEntry(menu, M_(data->name), NULL, "OPEN_MENU", buffer, path[data->index]);
|
||||
|
||||
wfree(buffer);
|
||||
if (data->name)
|
||||
wfree(data->name);
|
||||
wfree(data->name);
|
||||
wfree(data);
|
||||
}
|
||||
|
||||
@@ -1405,8 +1404,7 @@ static WMenu *readMenuDirectory(WScreen *scr, const char *title, char **path, co
|
||||
addMenuEntry(menu, M_(data->name), NULL, "SHEXEC", buffer, path[data->index]);
|
||||
|
||||
wfree(buffer);
|
||||
if (data->name)
|
||||
wfree(data->name);
|
||||
wfree(data->name);
|
||||
wfree(data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user