Skip to content

Commit c885ee3

Browse files
clementFoyerbosilca
authored andcommitted
Fix Coverity warning CID 1413323 (#3764)
Signed-off-by: Clement Foyer <[email protected]>
1 parent 1c336b8 commit c885ee3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ompi/mca/common/monitoring/common_monitoring_coll.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ static opal_hash_table_t *comm_data = NULL;
4747
static inline void mca_common_monitoring_coll_check_name(mca_monitoring_coll_data_t*data)
4848
{
4949
if( data->comm_name && data->p_comm && (data->p_comm->c_flags & OMPI_COMM_NAMEISSET)
50-
&& data->p_comm->c_name && 0 < strlen(data->p_comm->c_name)
50+
&& 0 < strlen(data->p_comm->c_name)
5151
&& 0 != strncmp(data->p_comm->c_name, data->comm_name, OPAL_MAX_OBJECT_NAME - 1) )
5252
{
5353
free(data->comm_name);
@@ -101,7 +101,9 @@ mca_monitoring_coll_data_t*mca_common_monitoring_coll_new( ompi_communicator_t*c
101101
return NULL;
102102
}
103103

104-
data->p_comm = comm;
104+
data->procs = NULL;
105+
data->comm_name = NULL;
106+
data->p_comm = comm;
105107

106108
/* Allocate hashtable */
107109
if( NULL == comm_data ) {

0 commit comments

Comments
 (0)