1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-12 07:03:44 +00:00

Fix benc list allocations for like the fourth time.

Hopefully this time it actually works.
This commit is contained in:
Josh Elsasser 2007-04-03 00:51:22 +00:00
parent f89831fc66
commit 7d67c4b457

View file

@ -40,9 +40,8 @@ static int makeroom( benc_val_t * val, int count )
}
/* We need a bigger boat */
len = val->val.l.alloc + ( count / LIST_SIZE ) +
( count % LIST_SIZE ? LIST_SIZE : 0 );
len = val->val.l.alloc + count +
( count % LIST_SIZE ? LIST_SIZE - ( count % LIST_SIZE ) : 0 );
new = realloc( val->val.l.vals, len * sizeof( benc_val_t ) );
if( NULL == new )
{