cleanup-rx-peer-leak-20041012
authorJeffrey Hutzelman <jhutz@cmu.edu>
Tue, 12 Oct 2004 21:51:55 +0000 (21:51 +0000)
committerDerrick Brashear <shadow@dementia.org>
Tue, 12 Oct 2004 21:51:55 +0000 (21:51 +0000)
if the peer was the second in the chain we could throw away our reference to
the first, effectively leaking it forever.

src/rx/rx.c

index c0a3d49..e3a68ed 100644 (file)
@@ -5763,7 +5763,7 @@ rxi_ReapConnections(void)
                    MUTEX_ENTER(&rx_stats_mutex);
                    rx_stats.nPeerStructs--;
                    MUTEX_EXIT(&rx_stats_mutex);
-                   if (prev == *peer_ptr) {
+                   if (peer == *peer_ptr) {
                        *peer_ptr = next;
                        prev = next;
                    } else