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
+4 -3
View File
@@ -324,10 +324,11 @@ ClientMemory::ClientMemory()
ClientMemory::~ClientMemory()
{
if (fBlock != NULL)
fAllocator->Free(fBlock);
if (fAllocator != NULL)
if (fAllocator != NULL) {
if (fBlock != NULL)
fAllocator->Free(fBlock);
fAllocator->ReleaseReference();
}
}