mirror of
https://github.com/transmission/transmission
synced 2024-12-27 01:57:52 +00:00
(trunk libT) #3566 "Memory leak in libtransmission/torrent.c: refreshCurrentDir()" -- fixed.
This commit is contained in:
parent
a46738b3ca
commit
c7ebb37876
1 changed files with 1 additions and 2 deletions
|
@ -2962,13 +2962,12 @@ static void
|
|||
refreshCurrentDir( tr_torrent * tor )
|
||||
{
|
||||
const char * dir = NULL;
|
||||
char * sub;
|
||||
|
||||
if( tor->incompleteDir == NULL )
|
||||
dir = tor->downloadDir;
|
||||
else if( !tr_torrentHasMetadata( tor ) ) /* no files to find */
|
||||
dir = tor->incompleteDir;
|
||||
else if( !tr_torrentFindFile2( tor, 0, &dir, &sub ) )
|
||||
else if( !tr_torrentFindFile2( tor, 0, &dir, NULL ) )
|
||||
dir = tor->incompleteDir;
|
||||
|
||||
assert( dir != NULL );
|
||||
|
|
Loading…
Reference in a new issue