Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

From: Gleb Natapov (glebn_at_[hidden])
Date: 2005-08-08 08:38:05


Hello,

Included patch fixes bugs in ompi_free_list in the case ompi_free_list was
created with NULL class and/or mpool parameters.

Index: ompi/class/ompi_free_list.c
===================================================================
--- ompi/class/ompi_free_list.c (revision 6760)
+++ ompi/class/ompi_free_list.c (working copy)
@@ -75,7 +75,7 @@ int ompi_free_list_grow(ompi_free_list_t
     unsigned char* ptr;
     size_t i;
     size_t mod;
- mca_mpool_base_registration_t* user_out;
+ mca_mpool_base_registration_t* user_out = NULL;
 
     if (flist->fl_max_to_alloc > 0 && flist->fl_num_allocated + num_elements > flist->fl_max_to_alloc)
         return OMPI_ERR_TEMP_OUT_OF_RESOURCE;
@@ -97,7 +97,10 @@ int ompi_free_list_grow(ompi_free_list_t
         item->user_data = user_out;
         if (NULL != flist->fl_elem_class) {
             OBJ_CONSTRUCT_INTERNAL(item, flist->fl_elem_class);
- }
+ } else {
+ OBJ_CONSTRUCT (&item->super, opal_list_item_t);
+ }
+
         opal_list_append(&(flist->super), &(item->super));
         ptr += flist->fl_elem_size;
     }

--
			Gleb.