aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xquartz/X11Application.m
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-02-25 07:51:00 +0000
committermarha <marha@users.sourceforge.net>2010-02-25 07:51:00 +0000
commitdca37d126746d995167a31f58d3a395ae162f5d4 (patch)
tree6f5a0e00be9e5f70d6bc341d4abdb1f14c8f79a2 /xorg-server/hw/xquartz/X11Application.m
parent23fda7c555e6c749b1d9727be5e5571a0559b9b3 (diff)
parent24bc15a386e37908396c3f6088f6fc98ceaa0f46 (diff)
downloadvcxsrv-dca37d126746d995167a31f58d3a395ae162f5d4.tar.gz
vcxsrv-dca37d126746d995167a31f58d3a395ae162f5d4.tar.bz2
vcxsrv-dca37d126746d995167a31f58d3a395ae162f5d4.zip
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/hw/xquartz/X11Application.m')
-rw-r--r--xorg-server/hw/xquartz/X11Application.m18
1 files changed, 10 insertions, 8 deletions
diff --git a/xorg-server/hw/xquartz/X11Application.m b/xorg-server/hw/xquartz/X11Application.m
index f3c8a307a..3faa1cb84 100644
--- a/xorg-server/hw/xquartz/X11Application.m
+++ b/xorg-server/hw/xquartz/X11Application.m
@@ -482,7 +482,7 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) {
return out;
}
-- (CFPropertyListRef) prefs_get:(NSString *)key {
+- (CFPropertyListRef) prefs_get_copy:(NSString *)key {
CFPropertyListRef value;
value = CFPreferencesCopyAppValue ((CFStringRef) key, app_prefs_domain_cfstr);
@@ -543,7 +543,7 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) {
CFPropertyListRef value;
int ret;
- value = [self prefs_get:key];
+ value = [self prefs_get_copy:key];
if (value != NULL && CFGetTypeID (value) == CFNumberGetTypeID ())
CFNumberGetValue (value, kCFNumberIntType, &ret);
@@ -561,7 +561,7 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) {
CFPropertyListRef value;
const char *ret = NULL;
- value = [self prefs_get:key];
+ value = [self prefs_get_copy:key];
if (value != NULL && CFGetTypeID (value) == CFStringGetTypeID ()) {
NSString *s = (NSString *) value;
@@ -578,12 +578,13 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) {
CFPropertyListRef value;
NSURL *ret = NULL;
- value = [self prefs_get:key];
+ value = [self prefs_get_copy:key];
if (value != NULL && CFGetTypeID (value) == CFStringGetTypeID ()) {
NSString *s = (NSString *) value;
ret = [NSURL URLWithString:s];
+ [ret retain];
}
if (value != NULL) CFRelease (value);
@@ -595,7 +596,7 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) {
CFPropertyListRef value;
float ret = def;
- value = [self prefs_get:key];
+ value = [self prefs_get_copy:key];
if (value != NULL
&& CFGetTypeID (value) == CFNumberGetTypeID ()
@@ -613,7 +614,7 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) {
CFPropertyListRef value;
int ret = def;
- value = [self prefs_get:key];
+ value = [self prefs_get_copy:key];
if (value != NULL) {
if (CFGetTypeID (value) == CFNumberGetTypeID ())
@@ -637,7 +638,7 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) {
NSArray *ret = nil;
CFPropertyListRef value;
- value = [self prefs_get:key];
+ value = [self prefs_get_copy:key];
if (value != NULL) {
if (CFGetTypeID (value) == CFArrayGetTypeID ())
@@ -757,7 +758,7 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) {
NSURL *url = [self prefs_copy_url:@PREFS_UPDATE_FEED default:nil];
if(url) {
[[SUUpdater sharedUpdater] setFeedURL:url];
- CFRelease(url);
+ [url release];
}
#endif
}
@@ -970,6 +971,7 @@ void X11ApplicationMain (int argc, char **argv, char **envp) {
// [[SUUpdater sharedUpdater] checkForUpdates:X11App];
#endif
+ [pool release];
[NSApp run];
/* not reached */
}