@@ -73,6 +73,7 @@ OPAL_DECLSPEC void opal_common_ucx_mca_var_register(const mca_base_component_t *
73
73
{
74
74
char * default_tls = "rc_verbs,ud_verbs,rc_mlx5,dc_mlx5,ud_mlx5,cuda_ipc,rocm_ipc" ;
75
75
char * default_devices = "mlx*" ;
76
+ char * old_str = NULL ;
76
77
int hook_index ;
77
78
int verbose_index ;
78
79
int progress_index ;
@@ -113,6 +114,7 @@ OPAL_DECLSPEC void opal_common_ucx_mca_var_register(const mca_base_component_t *
113
114
if (NULL == * opal_common_ucx .tls ) {
114
115
* opal_common_ucx .tls = strdup (default_tls );
115
116
}
117
+ old_str = * opal_common_ucx .tls ;
116
118
117
119
tls_index = mca_base_var_register (
118
120
"opal" , "opal_common" , "ucx" , "tls" ,
@@ -123,6 +125,7 @@ OPAL_DECLSPEC void opal_common_ucx_mca_var_register(const mca_base_component_t *
123
125
"please set to '^posix,sysv,self,tcp,cma,knem,xpmem'." ,
124
126
MCA_BASE_VAR_TYPE_STRING , NULL , 0 , MCA_BASE_VAR_FLAG_SETTABLE | MCA_BASE_VAR_FLAG_DWG ,
125
127
OPAL_INFO_LVL_3 , MCA_BASE_VAR_SCOPE_LOCAL , opal_common_ucx .tls );
128
+ free (old_str );
126
129
127
130
if (NULL == opal_common_ucx .devices ) {
128
131
opal_common_ucx .devices = (char * * ) malloc (sizeof (char * ));
@@ -132,13 +135,15 @@ OPAL_DECLSPEC void opal_common_ucx_mca_var_register(const mca_base_component_t *
132
135
if (NULL == * opal_common_ucx .devices ) {
133
136
* opal_common_ucx .devices = strdup (default_devices );
134
137
}
138
+ old_str = * opal_common_ucx .devices ;
135
139
136
140
devices_index = mca_base_var_register (
137
141
"opal" , "opal_common" , "ucx" , "devices" ,
138
142
"List of device driver pattern names, which, if supported by UCX, will "
139
143
"bump its priority above ob1. Special values: any (any available)" ,
140
144
MCA_BASE_VAR_TYPE_STRING , NULL , 0 , MCA_BASE_VAR_FLAG_SETTABLE | MCA_BASE_VAR_FLAG_DWG ,
141
145
OPAL_INFO_LVL_3 , MCA_BASE_VAR_SCOPE_LOCAL , opal_common_ucx .devices );
146
+ free (old_str );
142
147
143
148
if (component ) {
144
149
mca_base_var_register_synonym (verbose_index , component -> mca_project_name ,
0 commit comments