coverity#982591 Dereference after null check
Change-Id: I8651ecb0287d686da3e1ca6a6e46549abe3e0c38 Reviewed-on: https://gerrit.libreoffice.org/2225 Reviewed-by: Andras Timar <atimar@suse.com> Tested-by: Andras Timar <atimar@suse.com>
This commit is contained in:
committed by
Andras Timar
parent
e681622f3d
commit
cbe8883b51
@@ -509,17 +509,20 @@ SecurityEnvironment_NssImpl::getPersonalCertificates() throw( SecurityException
|
||||
}
|
||||
|
||||
priKeyList = PK11_ListPrivateKeysInSlot(slot) ;
|
||||
if( priKeyList != NULL ) {
|
||||
if( priKeyList != NULL )
|
||||
{
|
||||
for( curPri = PRIVKEY_LIST_HEAD( priKeyList );
|
||||
!PRIVKEY_LIST_END( curPri, priKeyList ) && curPri != NULL ;
|
||||
curPri = PRIVKEY_LIST_NEXT( curPri ) ) {
|
||||
curPri = PRIVKEY_LIST_NEXT( curPri ) )
|
||||
{
|
||||
xcert = NssPrivKeyToXCert( curPri->key ) ;
|
||||
if( xcert != NULL )
|
||||
certsList.push_back( xcert ) ;
|
||||
}
|
||||
SECKEY_DestroyPrivateKeyList( priKeyList ) ;
|
||||
}
|
||||
|
||||
SECKEY_DestroyPrivateKeyList( priKeyList ) ;
|
||||
|
||||
}
|
||||
|
||||
//secondly, we try to find certificate from registered private keys.
|
||||
|
Reference in New Issue
Block a user