Changeset 9798


Ignore:
Timestamp:
Dec 18, 2009, 5:32:16 PM (12 years ago)
Author:
charles
Message:

(trunk libT) it certainly smells like we're using freed memory in the libcurl + libevent code in web.c... let's trash the structures right before free()ing them

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/web.c

    r9760 r9798  
    2424enum
    2525{
     26    TR_MEMORY_TRASH = 0xCC,
     27
    2628    DEFAULT_TIMER_MSEC = 1500 /* arbitrary */
    2729};
     
    5860    curl_multi_cleanup( g->multi );
    5961    evtimer_del( &g->timer_event );
     62    memset( g, TR_MEMORY_TRASH, sizeof( struct tr_web ) );
    6063    tr_free( g );
    6164}
     
    8285    tr_free( task->range );
    8386    tr_free( task->url );
     87    memset( task, TR_MEMORY_TRASH, sizeof( struct tr_web_task ) );
    8488    tr_free( task );
    8589}
     
    283287        {
    284288            event_del( io_event );
     289            memset( io_event, TR_MEMORY_TRASH, sizeof( struct event ) );
    285290            tr_free( io_event );
    286291            curl_multi_assign( web->multi, fd, NULL );
Note: See TracChangeset for help on using the changeset viewer.