1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-03 21:12:05 +00:00

plug a trivial memory leak

This commit is contained in:
Mitchell Livingston 2008-06-15 04:56:57 +00:00
parent 72d9f5a946
commit 55699c2347

View file

@ -202,7 +202,7 @@
[fQueueSeedField setIntValue: [fDefaults integerForKey: @"QueueSeedNumber"]]; [fQueueSeedField setIntValue: [fDefaults integerForKey: @"QueueSeedNumber"]];
[fStalledField setIntValue: [fDefaults integerForKey: @"StalledMinutes"]]; [fStalledField setIntValue: [fDefaults integerForKey: @"StalledMinutes"]];
//set proxy fields //set proxy type
[fProxyAddressField setStringValue: [fDefaults stringForKey: @"ProxyAddress"]]; [fProxyAddressField setStringValue: [fDefaults stringForKey: @"ProxyAddress"]];
int proxyType; int proxyType;
switch(tr_sessionGetProxyType(fHandle)) switch(tr_sessionGetProxyType(fHandle))
@ -217,6 +217,8 @@
proxyType = PROXY_HTTP; proxyType = PROXY_HTTP;
} }
[fProxyTypePopUp selectItemAtIndex: proxyType]; [fProxyTypePopUp selectItemAtIndex: proxyType];
//set proxy password - does NOT need to be released
[fProxyPasswordField setStringValue: [NSString stringWithUTF8String: tr_sessionGetProxyPassword(fHandle)]]; [fProxyPasswordField setStringValue: [NSString stringWithUTF8String: tr_sessionGetProxyPassword(fHandle)]];
//set blocklist //set blocklist
@ -224,7 +226,11 @@
//set rpc port //set rpc port
[fRPCPortField setIntValue: [fDefaults integerForKey: @"RPCPort"]]; [fRPCPortField setIntValue: [fDefaults integerForKey: @"RPCPort"]];
[fRPCPasswordField setStringValue: [NSString stringWithUTF8String: tr_sessionGetRPCPassword(fHandle)]];
//set rpc password - has to be released
const char * rpcPassword = tr_sessionGetRPCPassword(fHandle);
[fRPCPasswordField setStringValue: [NSString stringWithUTF8String: rpcPassword]];
tr_free(rpcPassword);
} }
- (void) setUpdater: (SUUpdater *) updater - (void) setUpdater: (SUUpdater *) updater