Fix possible access to uninitialized values.
This commit is contained in:
parent
8d0c20c0f4
commit
34966a35b5
2 changed files with 33 additions and 3 deletions
|
@ -59,7 +59,7 @@
|
|||
@end
|
||||
|
||||
@implementation XMPPConnection
|
||||
@synthesize username, password, server, resource, JID, port, useTLS, delegate;
|
||||
@synthesize JID, port, useTLS, delegate;
|
||||
|
||||
- init
|
||||
{
|
||||
|
@ -110,6 +110,11 @@
|
|||
[old release];
|
||||
}
|
||||
|
||||
- (OFString*)username
|
||||
{
|
||||
return [[username copy] autorelease];
|
||||
}
|
||||
|
||||
- (void)setResource: (OFString*)resource_
|
||||
{
|
||||
OFString *old = resource;
|
||||
|
@ -133,6 +138,11 @@
|
|||
[old release];
|
||||
}
|
||||
|
||||
- (OFString*)resource
|
||||
{
|
||||
return [[resource copy] autorelease];
|
||||
}
|
||||
|
||||
- (void)setServer: (OFString*)server_
|
||||
{
|
||||
OFString *old = server;
|
||||
|
@ -156,6 +166,11 @@
|
|||
[old release];
|
||||
}
|
||||
|
||||
- (OFString*)server
|
||||
{
|
||||
return [[server copy] autorelease];
|
||||
}
|
||||
|
||||
- (void)setPassword: (OFString*)password_
|
||||
{
|
||||
OFString *old = password;
|
||||
|
@ -178,6 +193,11 @@
|
|||
[old release];
|
||||
}
|
||||
|
||||
- (OFString*)password
|
||||
{
|
||||
return [[password copy] autorelease];
|
||||
}
|
||||
|
||||
- (void)connect
|
||||
{
|
||||
OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue