Commits

Jeff Laing committed e29206b

Clang found a couple of leaks.
JLaing fixed them.

  • Participants
  • Parent commits c2508a2

Comments (0)

Files changed (1)

File MobileDeviceAccess.m

 		NSDictionary *reply = [self readXMLReply];
 		if (reply) {
 			[self performDelegateSelector:@selector(operationContinues:) withObject:reply];
-			NSMutableDictionary *result = [NSMutableDictionary new];
+			NSMutableDictionary *result = [[NSMutableDictionary new] autorelease];
 			NSDictionary *lookup_result = [reply objectForKey:@"LookupResult"];
 			for (NSString *key in lookup_result) {
 				NSDictionary *info = [lookup_result objectForKey:key];
-				[result setObject:[[AMApplication alloc] initWithDictionary:info]
-						   forKey:key];
+				AMApplication *app = [[AMApplication alloc] initWithDictionary:info];
+				[result setObject:app forKey:key];
+				[app release];
 			}
 			return [NSDictionary dictionaryWithDictionary:result];
 		}
 
 			message_observers = [NSMutableArray new];
 			[_messages setObject:message_observers forKey:notificationName];
+			[message_observers release];
 		}
 		[message_observers addObject:[NSArray arrayWithObjects:notificationObserver,NSStringFromSelector(notificationSelector),nil]];
 	} else {
 					if ([[info objectForKey:@"ApplicationType"] isEqual:@"User"]) {
 						AMApplication *newapp = [[AMApplication alloc] initWithDictionary:info];
 						[result addObject:newapp];
+						[newapp release];
 					}
 				}
 				CFRelease(dict);