Changeset 8877


Ignore:
Timestamp:
Aug 7, 2009, 12:58:34 AM (13 years ago)
Author:
charles
Message:

(trunk libT) possible fix for #2301, which is a valgrind complaint about uninitialized memory being written to disk while saving the bencoded .resume file. this commit theorizes that the warning is caused by not zeroing out the tr_peer array before filling it, so the extra bits in tr_addresses' ipv4/ipv6 union were never initialized. if this theory is correct, this commit (which zeros the memory first) should fix the bug.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/peer-mgr.c

    r8869 r8877  
    15381538        /* for now, this will waste memory on torrents that have both
    15391539         * ipv6 and ipv4 peers */
    1540         tr_pex * pex = tr_new( tr_pex, peerCount );
     1540        tr_pex * pex = tr_new0( tr_pex, peerCount );
    15411541        tr_pex * walk = pex;
    15421542
Note: See TracChangeset for help on using the changeset viewer.