fix possible benc leak reported by MishaS (#441)

This commit is contained in:
Charles Kerr 2007-11-01 18:44:37 +00:00
parent 7cb1791f2a
commit e3764e732b
1 changed files with 3 additions and 1 deletions

View File

@ -467,8 +467,10 @@ int tr_bencSave( benc_val_t * val, char ** buf, int * used, int * max )
for( i=0; i<ii; ++i ) {
const int index = indices[i].index;
if( tr_bencSave( val->val.l.vals + index, buf, used, max ) ||
tr_bencSave( val->val.l.vals + index + 1, buf, used, max ) )
tr_bencSave( val->val.l.vals + index + 1, buf, used, max ) ) {
tr_free( indices );
return 1;
}
}
tr_free( indices );
}