Skip to content

Commit

Permalink
Free memory for outItems array (dotnet#31937)
Browse files Browse the repository at this point in the history
  • Loading branch information
odhanson authored Feb 8, 2020
1 parent 5b0056b commit 7866adf
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,18 @@ OSStatus ExportImportKey(SecKeyRef* key, SecExternalItemType type)
CFRetain(outItem);
*key = (SecKeyRef)CONST_CAST(void *, outItem);

return noErr;
goto cleanup;
}
}
}

return errSecBadReq;
status = errSecBadReq;

cleanup:
if (outItems != NULL)
{
CFRelease(outItems);
}

return status;
}

0 comments on commit 7866adf

Please sign in to comment.