From: Christophe CURIS <christophe.cu...@free.fr> As pointed by Coverity, there is a NULL pointer check at the end of the function 'deleteFile' (which happens to not be necessary because wfree was made to accept NULL pointers), however there are many things done before that assumes the pointer is not NULL. The check is moved to where it matters.
Signed-off-by: Christophe CURIS <christophe.cu...@free.fr> --- WINGs/wfilepanel.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/WINGs/wfilepanel.c b/WINGs/wfilepanel.c index 0f12819..be604d7 100644 --- a/WINGs/wfilepanel.c +++ b/WINGs/wfilepanel.c @@ -695,6 +695,9 @@ static void deleteFile(WMWidget *widget, void *p_panel) (void) widget; file = getCurrentFileName(panel); + if (file == NULL) + return; + normalizePath(file); if (stat(file, &filestat) == -1) { @@ -725,8 +728,7 @@ static void deleteFile(WMWidget *widget, void *p_panel) } out: - if (file) - wfree(file); + wfree(file); } static void goUnmount(WMWidget *widget, void *p_panel) -- 1.9.2 -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.