mirror of
https://github.com/transmission/transmission
synced 2025-02-04 13:32:19 +00:00
fix possible benc leak reported by MishaS (#441)
This commit is contained in:
parent
7cb1791f2a
commit
e3764e732b
1 changed files with 3 additions and 1 deletions
|
@ -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 );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue