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:
Norbert Thiebaud
2013-02-18 04:04:16 -06:00
committed by Andras Timar
parent e681622f3d
commit cbe8883b51

View File

@@ -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.