Bugfixes for problems detected by clang's static analyser.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@33946 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Niels Grewe 2011-10-05 14:12:49 +00:00
parent 0288e9221b
commit cbc5f69c9e
3 changed files with 12 additions and 4 deletions

View File

@ -1,3 +1,11 @@
2011-10-05 Niels Grewe <niels.grewe@halbordnung.de>
* Source/DKProxy.m: Fix memory leak.
* Source/DKNotificationCenter.m: Rearrange to silence invalid warning
about use-after-free.
Bugfixes for problems detected by clang's static analyser.
2011-10-05 Niels Grewe <niels.grewe@halbordnung.de>
* Source/DKProperty.m: Absence of the change notification annotation in

View File

@ -1313,8 +1313,8 @@ static DKEndpointManager *manager;
parent: nil];
[signalInfo setObject: stubIf
forKey: interfaceName];
theInterface = stubIf;
[stubIf release];
theInterface = [signalInfo objectForKey: interfaceName];
}
if (nil != (signal = [[theInterface signals] objectForKey: name]))
@ -1493,8 +1493,8 @@ static DKEndpointManager *manager;
parent: nil];
[signalInfo setObject: stubIf
forKey: interfaceName];
theInterface = stubIf;
[stubIf release];
theInterface = [signalInfo objectForKey: interfaceName];
}
// Get the signal:

View File

@ -1118,8 +1118,8 @@ NSString* DKBusReconnectedNotification = @"DKBusReconnectedNotification";
* initializing). Using an DKNonAutoInvalidatingPort avoids this circular
* dependency.
*/
aPort = [[DKNonAutoInvalidatingPort alloc] initWithRemote: aService
atEndpoint: anEndpoint];
aPort = [[[DKNonAutoInvalidatingPort alloc] initWithRemote: aService
atEndpoint: anEndpoint] autorelease];
if (nil == (self = [super initWithPort: aPort
path: aPath]))