1
0
Fork 0
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:
Charles Kerr 2010-09-18 21:57:22 +00:00
parent a46738b3ca
commit c7ebb37876

View file

@ -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 );