Skip to content

Conversation

@kawashima-fj
Copy link
Member

The ompi_comm_set function never sets NULL to its first argument ncomm. So NULL check is unnecessary in its callers. Furthermore, NULL check may obscure a real return code when an error occurs if the variable is initialized to a NULL value.

Also, NULL check is added in the ompi_comm_set function to avoid segmentation fault in an out-of-memory condition.

The `ompi_comm_set` function never sets `NULL` to its first argument
`ncomm`.  So `NULL` check is unnecessary in its callers. Furthermore,
`NULL` check may obscure a real return code when an error occurs
if the variable is initialized to a `NULL` value.

Also, `NULL` check is added in the `ompi_comm_set` function to
avoid segmentation fault in an out-of-memory condition.

Signed-off-by: KAWASHIMA Takahiro <t-kawashima@jp.fujitsu.com>
@kawashima-fj kawashima-fj self-assigned this Jul 31, 2017
@kawashima-fj kawashima-fj merged commit a7a3042 into open-mpi:master Jul 31, 2017
@kawashima-fj kawashima-fj deleted the pr/comm-set-error branch November 24, 2017 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant