We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
username
1 parent 56a4e3f commit 970da0eCopy full SHA for 970da0e
Sources/CoreFoundation/CFKnownLocations.c
@@ -99,7 +99,9 @@ CFURLRef _Nullable _CFKnownLocationCreatePreferencesURLForUser(CFKnownLocationUs
99
username = CFGetUserName();
100
// The above API returns a non-NULL CFStringRef. The failed result is an empty string.
101
// We need to check for that case and fall through to the next case.
102
- if (!CFEqual(username, CFSTR(""))) {
+ Boolean isEmpty = CFEqual(username, CFSTR(""));
103
+ CFRelease(username);
104
+ if (!isEmpty) {
105
break;
106
}
107
// fallthrough.
0 commit comments