[mpich2-commits] r5510 - mpich2/trunk/src/mpi/comm

goodell at mcs.anl.gov goodell at mcs.anl.gov
Tue Oct 20 15:35:47 CDT 2009


Author: goodell
Date: 2009-10-20 15:35:47 -0500 (Tue, 20 Oct 2009)
New Revision: 5510

Modified:
   mpich2/trunk/src/mpi/comm/commutil.c
Log:
Avoid leaking another context ID.

This fixes the leak in the topo/cartcreates test.

No reviewer.

Modified: mpich2/trunk/src/mpi/comm/commutil.c
===================================================================
--- mpich2/trunk/src/mpi/comm/commutil.c	2009-10-20 20:35:45 UTC (rev 5509)
+++ mpich2/trunk/src/mpi/comm/commutil.c	2009-10-20 20:35:47 UTC (rev 5510)
@@ -932,7 +932,9 @@
     /* This is the local size, not the remote size, in the case of
        an intercomm */
     if (comm_ptr->rank >= size) {
-	*outcomm_ptr = 0;
+        *outcomm_ptr = 0;
+        /* always free the recvcontext ID, never the "send" ID */
+        MPIR_Free_contextid(new_recvcontext_id);
 	goto fn_exit;
     }
 



More information about the mpich2-commits mailing list