Changeset 547


Ignore:
Timestamp:
Jul 7, 2006, 11:13:51 PM (16 years ago)
Author:
joshe
Message:

Fix a couple more memory leaks in edge cases.

Location:
trunk/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/metainfo.c

    r405 r547  
    205205        fprintf( stderr, "Invalid \"piece\" string (size is %d)\n",
    206206                 val->val.s.i );
     207        tr_bencFree( &meta );
    207208        return 1;
    208209    }
     
    262263    {
    263264        fprintf( stderr, "Size of hashes and files don't match\n" );
     265        free( inf->pieces );
    264266        tr_bencFree( &meta );
    265267        return 1;
  • trunk/libtransmission/transmission.c

    r525 r547  
    234234        {
    235235            *error = TR_EDUPLICATE;
     236            free( inf->pieces );
     237            free( inf->files );
    236238            free( tor );
    237239            return NULL;
     
    755757
    756758    h->acceptDie = 1;
     759    tr_lockLock( &h->acceptLock );
    757760    tr_threadJoin( &h->acceptThread );
     761    tr_lockUnlock( &h->acceptLock );
    758762    tr_lockClose( &h->acceptLock );
    759763    tr_dbg( "Accept thread joined" );
Note: See TracChangeset for help on using the changeset viewer.