[haiku-commits] Change in haiku[master]: appserver: Fix PVS V595

  • From: Gerrit <review@xxxxxxxxxxxxxxxxxxx>
  • To: waddlesplash <waddlesplash@xxxxxxxxx>, haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 27 Jan 2020 11:45:26 +0000

From Murai Takashi <tmurai01@xxxxxxxxx>:

Murai Takashi has uploaded this change for review. ( 
https://review.haiku-os.org/c/haiku/+/2162 ;)


Change subject: appserver: Fix PVS V595
......................................................................

appserver: Fix PVS V595

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

Change-Id: Ifb72266b4d4c5f076f0c663066dc9b81e94fc201
---
M src/servers/app/ClientMemoryAllocator.cpp
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://git.haiku-os.org:22/haiku refs/changes/62/2162/1

diff --git a/src/servers/app/ClientMemoryAllocator.cpp 
b/src/servers/app/ClientMemoryAllocator.cpp
index 746f12c..a642007 100644
--- a/src/servers/app/ClientMemoryAllocator.cpp
+++ b/src/servers/app/ClientMemoryAllocator.cpp
@@ -324,7 +324,7 @@

 ClientMemory::~ClientMemory()
 {
-       if (fBlock != NULL)
+       if (fAllocator != NULL && fBlock != NULL)
                fAllocator->Free(fBlock);
        if (fAllocator != NULL)
                fAllocator->ReleaseReference();

--
To view, visit https://review.haiku-os.org/c/haiku/+/2162
To unsubscribe, or for help writing mail filters, visit 
https://review.haiku-os.org/settings

Gerrit-Project: haiku
Gerrit-Branch: master
Gerrit-Change-Id: Ifb72266b4d4c5f076f0c663066dc9b81e94fc201
Gerrit-Change-Number: 2162
Gerrit-PatchSet: 1
Gerrit-Owner: Murai Takashi <tmurai01@xxxxxxxxx>
Gerrit-MessageType: newchange

Other related posts:

  • » [haiku-commits] Change in haiku[master]: appserver: Fix PVS V595 - Gerrit