]> granicus.if.org Git - transmission/commitdiff
(trunk libT) possible fix for #2301, which is a valgrind complaint about uninitialize...
authorCharles Kerr <charles@transmissionbt.com>
Fri, 7 Aug 2009 00:58:34 +0000 (00:58 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Fri, 7 Aug 2009 00:58:34 +0000 (00:58 +0000)
libtransmission/peer-mgr.c

index f3d7f16b857efe1e57ec4fde30f57ac0d96e1a11..46e3677e349e48dde41b521f7bed59451e07b3db 100644 (file)
@@ -1537,7 +1537,7 @@ tr_peerMgrGetPeers( tr_torrent      * tor,
         const int peerCount = tr_ptrArraySize( &t->peers );
         /* for now, this will waste memory on torrents that have both
          * ipv6 and ipv4 peers */
-        tr_pex * pex = tr_new( tr_pex, peerCount );
+        tr_pex * pex = tr_new0( tr_pex, peerCount );
         tr_pex * walk = pex;
 
         for( i=0; i<peerCount; ++i )