From: Christophe CURIS <christophe.cu...@free.fr>

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.cu...@free.fr>
---
 src/rootmenu.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/rootmenu.c b/src/rootmenu.c
index 1303204..fca0cb7 100644
--- a/src/rootmenu.c
+++ b/src/rootmenu.c
@@ -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);
        }
 
-- 
2.1.1


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to