mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-22 04:30:47 +00:00
Guard against NULL CFRelease() on failure condition in fallback path (#2867)
This was caught by analysis for XPC validation path. This is very unlikely to be hit practically.
This commit is contained in:
1 file changed
+3
-1
@@ -471,7 +471,9 @@ finally:
|
||||
SecCodeRef code = NULL;
|
||||
OSStatus result = SecCodeCopyGuestWithAttributes(NULL, (__bridge CFDictionaryRef _Nullable)(attributes), kSecCSDefaultFlags, &code);
|
||||
if (result != errSecSuccess) {
|
||||
CFRelease(code);
|
||||
if (code != NULL) {
|
||||
CFRelease(code);
|
||||
}
|
||||
|
||||
if (error != NULL) {
|
||||
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUInsufficientSigningError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"The client connection could not be validated because SecCodeCopyGuestWithAttributes() failed with error %d", result] }];
|
||||
|
||||
Reference in new issue
Block a user