appserver: Fix PVS V595

Add NULL check for fAllocator, since it might return NULL.

Change-Id: Ifb72266b4d4c5f076f0c663066dc9b81e94fc201
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2162
Reviewed-by: Stephan Aßmus <[email protected]>
This commit is contained in:
Murai Takashi
2020-01-28 18:01:14 +00:00
committed by Stephan Aßmus
parent 88d73c6cf8
commit 2afe4c52c8
+2 -1
View File
@@ -324,11 +324,12 @@ ClientMemory::ClientMemory()
ClientMemory::~ClientMemory() ClientMemory::~ClientMemory()
{ {
if (fAllocator != NULL) {
if (fBlock != NULL) if (fBlock != NULL)
fAllocator->Free(fBlock); fAllocator->Free(fBlock);
if (fAllocator != NULL)
fAllocator->ReleaseReference(); fAllocator->ReleaseReference();
} }
}
void* void*