diff --git a/ompi/request/req_wait.c b/ompi/request/req_wait.c index 1433f7b53e..917dcd0142 100644 --- a/ompi/request/req_wait.c +++ b/ompi/request/req_wait.c @@ -245,7 +245,7 @@ int ompi_request_wait_all( } else { /* free request if required */ rptr = requests; - for (i = 0; i < count; i++) { + for (i = 0; i < count; i++, rptr++) { int rc; request = *rptr; if(request == MPI_REQUEST_NULL || @@ -255,7 +255,6 @@ int ompi_request_wait_all( rc = request->req_fini(rptr); if (rc != OMPI_SUCCESS) return rc; - rptr++; } } return OMPI_SUCCESS;