mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 12:58:08 +01:00
WINGs: fix memory leak in WMGetBrowserPaths (Coverity #50111)
As reported by Coverity, in the (rare) case where the wstrlcat would fail the array for the result would not be freed before returning. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
47b801021c
commit
d65430137d
@@ -781,6 +781,7 @@ WMArray *WMGetBrowserPaths(WMBrowser * bPtr)
|
||||
for (i = 0; i <= column; i++) {
|
||||
if (wstrlcat(path, bPtr->pathSeparator, slen) >= slen) {
|
||||
wfree(path);
|
||||
WMFreeArray(paths);
|
||||
return NULL;
|
||||
}
|
||||
if (i == column) {
|
||||
|
||||
Reference in New Issue
Block a user