mirror of
https://github.com/transmission/transmission
synced 2025-02-24 15:10:39 +00:00
#4055 Fix a memory leak when removing a transfer + data file
This commit is contained in:
parent
324f0f470c
commit
7f38a37e53
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue