int flag;
xbt_dict_foreach((*type)->attributes, cursor, key, value){
smpi_type_key_elem elem = xbt_dict_get_or_null(smpi_type_keyvals, (const char*)key);
- if(elem)
+ if(elem && elem->delete_fn)
elem->delete_fn(*type, atoi((const char*)key), &value, &flag);
}
}
return MPI_ERR_ARG;
xbt_dict_remove(type->attributes, (const char*)tmpkey);
+ xbt_free(tmpkey);
return MPI_SUCCESS;
}
*flag=0;
xbt_ex_free(ex);
}
+ xbt_free(tmpkey);
return MPI_SUCCESS;
}
type->attributes=xbt_dict_new();
xbt_dict_set(type->attributes, (const char*)tmpkey, attr_value, NULL);
+ xbt_free(tmpkey);
return MPI_SUCCESS;
}
sprintf(tmpkey, "%d", *keyval);
xbt_dict_set(smpi_type_keyvals,(const char*)tmpkey,(void*)value, NULL);
type_keyval_id++;
+ xbt_free(tmpkey);
return MPI_SUCCESS;
}
sprintf(tmpkey, "%d", *keyval);
xbt_dict_remove(smpi_type_keyvals, (const char*)tmpkey);
xbt_free(elem);
+ xbt_free(tmpkey);
return MPI_SUCCESS;
}