#4055 Fix a memory leak when removing a transfer + data file

This commit is contained in:
Mitchell Livingston 2011-03-25 01:37:50 +00:00
parent 324f0f470c
commit 7f38a37e53
1 changed files with 4 additions and 0 deletions

View File

@ -88,8 +88,12 @@ void metadataCallback(tr_torrent * torrent, void * torrentData)
int trashDataFile(const char * filename)
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
if (filename != NULL)
[Torrent trashFile: [NSString stringWithUTF8String: filename]];
[pool drain];
return 0;
}