CFRelease the duration preference value if we get one. Found by the clang static analyzer.
1.1 --- a/Plugins/Displays/Bezel/GrowlBezelWindowController.m Sun Jun 29 19:10:42 2008 +0000
1.2 +++ b/Plugins/Displays/Bezel/GrowlBezelWindowController.m Sun Jul 06 15:10:15 2008 +0000
1.3 @@ -34,6 +34,7 @@
1.4 [self setDisplayDuration:(prefsDuration ?
1.5 [(NSNumber *)prefsDuration doubleValue] :
1.6 MIN_DISPLAY_TIME)];
1.7 + if (prefsDuration) CFRelease(prefsDuration);
1.8
1.9 READ_GROWL_PREF_INT(BEZEL_SCREEN_PREF, GrowlBezelPrefDomain, &screenNumber);
1.10 NSArray *screens = [NSScreen screens];
2.1 --- a/Plugins/Displays/Brushed/GrowlBrushedWindowController.m Sun Jun 29 19:10:42 2008 +0000
2.2 +++ b/Plugins/Displays/Brushed/GrowlBrushedWindowController.m Sun Jul 06 15:10:15 2008 +0000
2.3 @@ -43,6 +43,7 @@
2.4 [self setDisplayDuration:(prefsDuration ?
2.5 [(NSNumber *)prefsDuration doubleValue] :
2.6 GrowlBrushedDurationPrefDefault)];
2.7 + if (prefsDuration) CFRelease(prefsDuration);
2.8
2.9 // Create window...
2.10 NSRect windowFrame = NSMakeRect(0.0f, 0.0f, GrowlBrushedNotificationWidth, 65.0f);
3.1 --- a/Plugins/Displays/Bubbles/GrowlBubblesWindowController.m Sun Jun 29 19:10:42 2008 +0000
3.2 +++ b/Plugins/Displays/Bubbles/GrowlBubblesWindowController.m Sun Jul 06 15:10:15 2008 +0000
3.3 @@ -38,6 +38,7 @@
3.4 [self setDisplayDuration:(prefsDuration ?
3.5 [(NSNumber *)prefsDuration doubleValue] :
3.6 GrowlBubblesDurationPrefDefault)];
3.7 + if (prefsDuration) CFRelease(prefsDuration);
3.8
3.9 // I tried setting the width/height to zero, since the view resizes itself later.
3.10 // This made it ignore the alpha at the edges (using 1.0 instead). Why?
4.1 --- a/Plugins/Displays/MusicVideo/GrowlMusicVideoWindowController.m Sun Jun 29 19:10:42 2008 +0000
4.2 +++ b/Plugins/Displays/MusicVideo/GrowlMusicVideoWindowController.m Sun Jul 06 15:10:15 2008 +0000
4.3 @@ -76,6 +76,7 @@
4.4 [self setDisplayDuration:(prefsDuration ?
4.5 [(NSNumber *)prefsDuration doubleValue] :
4.6 GrowlMusicVideoDurationPrefDefault)];
4.7 + if (prefsDuration) CFRelease(prefsDuration);
4.8
4.9 //The default duration for transitions is far too long for the music video effect.
4.10 [self setTransitionDuration:0.3];
5.1 --- a/Plugins/Displays/Nano/GrowlNanoWindowController.m Sun Jun 29 19:10:42 2008 +0000
5.2 +++ b/Plugins/Displays/Nano/GrowlNanoWindowController.m Sun Jul 06 15:10:15 2008 +0000
5.3 @@ -29,6 +29,7 @@
5.4 [self setDisplayDuration:(prefsDuration ?
5.5 [(NSNumber *)prefsDuration doubleValue] :
5.6 GrowlNanoDurationPrefDefault)];
5.7 + if (prefsDuration) CFRelease(prefsDuration);
5.8
5.9 screenNumber = 0U;
5.10 READ_GROWL_PREF_INT(Nano_SCREEN_PREF, GrowlNanoPrefDomain, &screenNumber);
6.1 --- a/Plugins/Displays/Smoke/GrowlSmokeWindowController.m Sun Jun 29 19:10:42 2008 +0000
6.2 +++ b/Plugins/Displays/Smoke/GrowlSmokeWindowController.m Sun Jul 06 15:10:15 2008 +0000
6.3 @@ -36,6 +36,7 @@
6.4 [self setDisplayDuration:(prefsDuration ?
6.5 [(NSNumber *)prefsDuration doubleValue] :
6.6 GrowlSmokeDurationPrefDefault)];
6.7 + if (prefsDuration) CFRelease(prefsDuration);
6.8
6.9 NSPanel *panel = [[NSPanel alloc] initWithContentRect:NSMakeRect(0.0f, 0.0f, GrowlSmokeNotificationWidth, 65.0f)
6.10 styleMask:NSBorderlessWindowMask | NSNonactivatingPanelMask
7.1 --- a/Plugins/Displays/WebKit/GrowlWebKitWindowController.m Sun Jun 29 19:10:42 2008 +0000
7.2 +++ b/Plugins/Displays/WebKit/GrowlWebKitWindowController.m Sun Jul 06 15:10:15 2008 +0000
7.3 @@ -90,7 +90,7 @@
7.4 [self setDisplayDuration:(prefsDuration ?
7.5 [(NSNumber *)prefsDuration doubleValue] :
7.6 GrowlWebKitDurationPrefDefault)];
7.7 -
7.8 + if (prefsDuration) CFRelease(prefsDuration);
7.9
7.10 // Read the plugin specifics from the info.plist
7.11 NSDictionary *styleInfo = [[plugin bundle] infoDictionary];
8.1 --- a/Plugins/Displays/iCal/GrowliCalWindowController.m Sun Jun 29 19:10:42 2008 +0000
8.2 +++ b/Plugins/Displays/iCal/GrowliCalWindowController.m Sun Jul 06 15:10:15 2008 +0000
8.3 @@ -38,6 +38,7 @@
8.4 [self setDisplayDuration:(prefsDuration ?
8.5 [(NSNumber *)prefsDuration doubleValue] :
8.6 GrowliCalDurationPrefDefault)];
8.7 + if (prefsDuration) CFRelease(prefsDuration);
8.8
8.9 // I tried setting the width/height to zero, since the view resizes itself later.
8.10 // This made it ignore the alpha at the edges (using 1.0 instead). Why?