未验证 提交 07fce444 编写于 作者: M Marius Ungureanu 提交者: GitHub

Fix leaks caused by mismatch of CFRelease/CFRetain with SecItemCopyMatching

上级 f0845bde
......@@ -45,13 +45,11 @@ static int32_t EnumerateKeychain(CFStringRef matchType, CFArrayRef* pCertsOut)
assert(result == NULL);
status = noErr;
}
else
{
if (result != NULL)
{
CFRelease(result);
}
}
return status;
}
......
......@@ -263,6 +263,11 @@ static bool IsCertInKeychain(CFTypeRef needle, SecKeychainRef haystack)
ret = false;
}
if (result != NULL)
{
CFRelease(result);
}
CFRelease(itemMatch);
CFRelease(searchList);
CFRelease(query);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册