mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2026-10-22 01:51:20 +03:00
fix "Access to field 'p' results in a dereference of a null pointer (loaded from field 'Folders')" found by clang static analyzer
This commit is contained in:
1 parent
39cf3a77cc
commit
095d5e7b70
1 file changed
+5
@@ -2338,6 +2338,11 @@ void CfgDeleteFolder(FOLDER *f)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(f->Folders == NULL)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Remove all subfolders
|
// Remove all subfolders
|
||||||
num = LIST_NUM(f->Folders);
|
num = LIST_NUM(f->Folders);
|
||||||
ff = Malloc(sizeof(FOLDER *) * num);
|
ff = Malloc(sizeof(FOLDER *) * num);
|
||||||
|
|||||||
Reference in new issue
Block a user