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:
committed by
Stephan Aßmus
parent
88d73c6cf8
commit
2afe4c52c8
@@ -324,10 +324,11 @@ ClientMemory::ClientMemory()
|
|||||||
|
|
||||||
ClientMemory::~ClientMemory()
|
ClientMemory::~ClientMemory()
|
||||||
{
|
{
|
||||||
if (fBlock != NULL)
|
if (fAllocator != NULL) {
|
||||||
fAllocator->Free(fBlock);
|
if (fBlock != NULL)
|
||||||
if (fAllocator != NULL)
|
fAllocator->Free(fBlock);
|
||||||
fAllocator->ReleaseReference();
|
fAllocator->ReleaseReference();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user