353777: Klocwork Null ptr dereferences in pk11obj.c. r=nelson
git-svn-id: svn://10.0.0.236/trunk@213366 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1187,7 +1187,9 @@ PK11_FindGenericObjects(PK11SlotInfo *slot, CK_OBJECT_CLASS objClass)
|
||||
for (i=0; i < count; i++) {
|
||||
obj = PORT_New(PK11GenericObject);
|
||||
if ( !obj ) {
|
||||
PK11_DestroyGenericObjects(firstObj);
|
||||
if (firstObj) {
|
||||
PK11_DestroyGenericObjects(firstObj);
|
||||
}
|
||||
PORT_Free(objectIDs);
|
||||
return NULL;
|
||||
}
|
||||
@@ -1289,7 +1291,7 @@ SECStatus
|
||||
PK11_DestroyGenericObjects(PK11GenericObject *objects)
|
||||
{
|
||||
PK11GenericObject *nextObject;
|
||||
PK11GenericObject *prevObject = objects->prev;
|
||||
PK11GenericObject *prevObject;
|
||||
|
||||
if (objects == NULL) {
|
||||
return SECSuccess;
|
||||
|
||||
Reference in New Issue
Block a user