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);
|
RETURN_ERROR(B_NO_MEMORY);
|
||||||
ObjectDeleter<SecurityContext> securityContextDeleter(securityContext);
|
ObjectDeleter<SecurityContext> securityContextDeleter(securityContext);
|
||||||
error = securityContext->InitCheck();
|
error = securityContext->InitCheck();
|
||||||
if (error != B_OK) {
|
if (error != B_OK)
|
||||||
delete securityContext;
|
|
||||||
RETURN_ERROR(error);
|
RETURN_ERROR(error);
|
||||||
}
|
|
||||||
|
|
||||||
// set it
|
// set it
|
||||||
delete fSecurityContext;
|
delete fSecurityContext;
|
||||||
|
|||||||
Reference in New Issue
Block a user