From 7b04252acd853ffeb96bf0c1878385c63b7190ee Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 18 Jun 2008 09:40:31 -0400 Subject: [PATCH] The hostname was using an autorelease'd initializer, so switch to an alloc'd one * Source/SocketWrapper.m: (connect:): Use [NSString initWithUTF8String:] instead of [NSString stringWithUTF8String:] (dealloc): Add the corresponding release call --- Source/SocketWrapper.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/SocketWrapper.m b/Source/SocketWrapper.m index f41b98c..2e47a05 100644 --- a/Source/SocketWrapper.m +++ b/Source/SocketWrapper.m @@ -48,6 +48,7 @@ - (void)dealloc { [connection release]; + [hostname release]; [super dealloc]; } @@ -157,7 +158,7 @@ [self error:@"Could not get remote hostname."]; } char *name = inet_ntoa(addr.sin_addr); - hostname = [NSString stringWithUTF8String:name]; + hostname = [[NSString alloc] initWithUTF8String:name]; [connection performSelectorOnMainThread:@selector(socketDidAccept:) withObject:nil waitUntilDone:NO]; -- 2.22.5