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 <[email protected]>
This commit is contained in:
committed by
Adrien Destugues
parent
af61539918
commit
1d0064be8b
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user