mirror of
https://github.com/transmission/transmission
synced 2024-12-26 17:47:37 +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 )
|
refreshCurrentDir( tr_torrent * tor )
|
||||||
{
|
{
|
||||||
const char * dir = NULL;
|
const char * dir = NULL;
|
||||||
char * sub;
|
|
||||||
|
|
||||||
if( tor->incompleteDir == NULL )
|
if( tor->incompleteDir == NULL )
|
||||||
dir = tor->downloadDir;
|
dir = tor->downloadDir;
|
||||||
else if( !tr_torrentHasMetadata( tor ) ) /* no files to find */
|
else if( !tr_torrentHasMetadata( tor ) ) /* no files to find */
|
||||||
dir = tor->incompleteDir;
|
dir = tor->incompleteDir;
|
||||||
else if( !tr_torrentFindFile2( tor, 0, &dir, &sub ) )
|
else if( !tr_torrentFindFile2( tor, 0, &dir, NULL ) )
|
||||||
dir = tor->incompleteDir;
|
dir = tor->incompleteDir;
|
||||||
|
|
||||||
assert( dir != NULL );
|
assert( dir != NULL );
|
||||||
|
|
Loading…
Reference in a new issue