don't leak in the pool (heh heh)

This commit is contained in:
Mitchell Livingston 2006-12-13 18:30:11 +00:00
parent e0790f955a
commit 21ed57092a
1 changed files with 7 additions and 4 deletions

View File

@ -279,14 +279,17 @@ int tr_cpMostMissingBlockInPiece( tr_completion_t * cp, int piece,
} }
} }
if( poolSize < 1 ) if( poolSize > 0 )
{ {
return -1; ret = pool[0];
*downloaders = min;
}
else
{
ret = -1;
} }
ret = pool[0];
free( pool ); free( pool );
*downloaders = min;
return ret; return ret;
} }