mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 04:20:27 +01:00
util: return from 'findCopyFile' if the source file could not be found (Coverity #50075)
As pointed by Coverity, the function handles the case where the file to be copied is not found by properly warning the user and the deleting the currently built theme directory, but then it continued executing the file copy that would crash on the null pointer. This patch just adds the missing return that will avoid the crash. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
8ed6eacd06
commit
6397f3403a
@@ -172,6 +172,7 @@ static void findCopyFile(const char *dir, const char *file)
|
||||
wwarning("Could not find file %s", file);
|
||||
if (ThemePath)
|
||||
(void)wrmdirhier(ThemePath);
|
||||
return;
|
||||
}
|
||||
wcopy_file(dir, fullPath, fullPath);
|
||||
free(fullPath);
|
||||
|
||||
Reference in New Issue
Block a user