1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-26 11:29:53 +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:
Ilya Shipitsin 2016-11-28 19:33:15 +05:00
parent 39cf3a77cc
commit 095d5e7b70

View File

@ -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);