lets not leak a string

This commit is contained in:
Mitchell Livingston 2009-10-21 13:03:37 +00:00
parent 581afef25a
commit 0281256288
1 changed files with 6 additions and 0 deletions

View File

@ -184,7 +184,11 @@ int trashDataFile(const char * filename)
{
//allow the file to be index by Time Machine
if (fTimeMachineExclude)
{
[self setTimeMachineExclude: NO forPath: fTimeMachineExclude];
[fTimeMachineExclude release];
fTimeMachineExclude = nil;
}
tr_torrentRemove(fHandle);
}
@ -1740,12 +1744,14 @@ int trashDataFile(const char * filename)
if (fTimeMachineExclude)
{
[self setTimeMachineExclude: NO forPath: fTimeMachineExclude];
[fTimeMachineExclude release];
fTimeMachineExclude = nil;
}
if (newLocation && ![self allDownloaded])
{
[self setTimeMachineExclude: YES forPath: newLocation];
[fTimeMachineExclude release];
fTimeMachineExclude = [newLocation retain];
}
}