[haiku-commits] haiku: hrev52841 - src/add-ons/kernel/file_systems/netfs/server

  • From: Adrien Destugues <pulkomandy@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 6 Feb 2019 02:27:21 -0500 (EST)

hrev52841 adds 1 changeset to branch 'master'
old head: af615399189deeec8d412ec165ab638326471ab1
new head: 1d0064be8b306320008ee7d953460b604ba98c8c
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=1d0064be8b30+%5Eaf615399189d

----------------------------------------------------------------------------

1d0064be8b30: file_systems/netfs/server: Fix attempting to delete released 
memory
  
  Remove 'delete securityContext;' at line 967, since 'securityContext'
  will be deleted by ObjectDeleter.
  
  Pointed by clang static analyzer.
  
  Change-Id: Iffcd6e2b293d5614fa15ee108562ff1f5f23ddc9
  Reviewed-on: https://review.haiku-os.org/c/1011
  Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

                                      [ Murai Takashi <tmurai01@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev52841
Commit:      1d0064be8b306320008ee7d953460b604ba98c8c
URL:         https://git.haiku-os.org/haiku/commit/?id=1d0064be8b30
Author:      Murai Takashi <tmurai01@xxxxxxxxx>
Date:        Tue Feb  5 21:15:49 2019 UTC
Committer:   Adrien Destugues <pulkomandy@xxxxxxxxx>
Commit-Date: Wed Feb  6 07:27:12 2019 UTC

----------------------------------------------------------------------------

1 file changed, 1 insertion(+), 3 deletions(-)
src/add-ons/kernel/file_systems/netfs/server/NetFSServer.cpp | 4 +---

----------------------------------------------------------------------------

diff --git a/src/add-ons/kernel/file_systems/netfs/server/NetFSServer.cpp 
b/src/add-ons/kernel/file_systems/netfs/server/NetFSServer.cpp
index 324b271243..bb8b9e2f3a 100644
--- a/src/add-ons/kernel/file_systems/netfs/server/NetFSServer.cpp
+++ b/src/add-ons/kernel/file_systems/netfs/server/NetFSServer.cpp
@@ -963,10 +963,8 @@ NetFSServer::_LoadSettings()
                RETURN_ERROR(B_NO_MEMORY);
        ObjectDeleter<SecurityContext> securityContextDeleter(securityContext);
        error = securityContext->InitCheck();
-       if (error != B_OK) {
-               delete securityContext;
+       if (error != B_OK)
                RETURN_ERROR(error);
-       }
 
        // set it
        delete fSecurityContext;


Other related posts:

  • » [haiku-commits] haiku: hrev52841 - src/add-ons/kernel/file_systems/netfs/server - Adrien Destugues