Changeset 6195


Ignore:
Timestamp:
Jun 15, 2008, 4:56:57 AM (13 years ago)
Author:
livings124
Message:

plug a trivial memory leak

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/PrefsController.m

    r6178 r6195  
    203203    [fStalledField setIntValue: [fDefaults integerForKey: @"StalledMinutes"]];
    204204   
    205     //set proxy fields
     205    //set proxy type
    206206    [fProxyAddressField setStringValue: [fDefaults stringForKey: @"ProxyAddress"]];
    207207    int proxyType;
     
    218218    }
    219219    [fProxyTypePopUp selectItemAtIndex: proxyType];
     220   
     221    //set proxy password - does NOT need to be released
    220222    [fProxyPasswordField setStringValue: [NSString stringWithUTF8String: tr_sessionGetProxyPassword(fHandle)]];
    221223   
     
    225227    //set rpc port
    226228    [fRPCPortField setIntValue: [fDefaults integerForKey: @"RPCPort"]];
    227     [fRPCPasswordField setStringValue: [NSString stringWithUTF8String: tr_sessionGetRPCPassword(fHandle)]];
     229   
     230    //set rpc password - has to be released
     231    const char * rpcPassword = tr_sessionGetRPCPassword(fHandle);
     232    [fRPCPasswordField setStringValue: [NSString stringWithUTF8String: rpcPassword]];
     233    tr_free(rpcPassword);
    228234}
    229235
Note: See TracChangeset for help on using the changeset viewer.