X-Git-Url: https://git.saurik.com/apple/configd.git/blobdiff_plain/791b08356c62be042d56dd05c1cc0ace4b068c53..edebe297f772e4cdd76278ebb777820466d2917b:/SystemConfiguration.fproj/SCPList.c diff --git a/SystemConfiguration.fproj/SCPList.c b/SystemConfiguration.fproj/SCPList.c index 8a4266f..fa5437d 100644 --- a/SystemConfiguration.fproj/SCPList.c +++ b/SystemConfiguration.fproj/SCPList.c @@ -1,5 +1,5 @@ /* - * Copyright(c) 2000-2003 Apple Computer, Inc. All rights reserved. + * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -38,7 +38,7 @@ CFArrayRef SCPreferencesCopyKeyList(SCPreferencesRef prefs) { - CFAllocatorRef allocator = CFGetAllocator(prefs); + CFAllocatorRef allocator; CFArrayRef keys; SCPreferencesPrivateRef prefsPrivate = (SCPreferencesPrivateRef)prefs; CFIndex prefsCnt; @@ -52,6 +52,7 @@ SCPreferencesCopyKeyList(SCPreferencesRef prefs) __SCPreferencesAccess(prefs); + allocator = CFGetAllocator(prefs); prefsCnt = CFDictionaryGetCount(prefsPrivate->prefs); if (prefsCnt > 0) { prefsKeys = CFAllocatorAllocate(allocator, prefsCnt * sizeof(CFStringRef), 0);