diff --git a/AudioScrobbler/AudioScrobbler.m b/AudioScrobbler/AudioScrobbler.m index 5cbcc81a4..a3c4e52ea 100644 --- a/AudioScrobbler/AudioScrobbler.m +++ b/AudioScrobbler/AudioScrobbler.m @@ -203,7 +203,7 @@ escapeForLastFM(NSString *string) @synchronized([myself queue]) { enumerator = [[myself queue] objectEnumerator]; - command = [enumerator nextObject]; + command = [[enumerator nextObject] retain]; [[myself queue] removeObjectIdenticalTo:command]; } @@ -213,6 +213,8 @@ escapeForLastFM(NSString *string) port = [client connectToHost:@"localhost" port:port]; [client send:command]; + [command release]; + response = [client receive]; if(2 > [response length] || NSOrderedSame != [response compare:@"OK" options:NSLiteralSearch range:NSMakeRange(0,2)]) { NSLog(@"AudioScrobbler error: %@", response);