diff --git a/src/bio/bio_xstream.c b/src/bio/bio_xstream.c index 7a5445a1578b..fb9f0997e8c1 100644 --- a/src/bio/bio_xstream.c +++ b/src/bio/bio_xstream.c @@ -296,7 +296,7 @@ bio_nvme_init(const char *nvme_conf, int numa_node, unsigned int mem_size, D_WARN("AIO device(s) will be used!\n"); nvme_glb.bd_bdev_class = BDEV_CLASS_AIO; } - d_free_env_str(&env); + d_freeenv_str(&env); if (numa_node > 0) { bio_numa_node = (unsigned int)numa_node; diff --git a/src/cart/crt_init.c b/src/cart/crt_init.c index 94153fbbc4ca..0399fd506089 100644 --- a/src/cart/crt_init.c +++ b/src/cart/crt_init.c @@ -110,7 +110,7 @@ dump_envariables(void) D_INFO("%s = %s\n", var_names[i], "********"); else D_INFO("%s = %s\n", var_names[i], val); - d_free_env_str(&val); + d_freeenv_str(&val); } } @@ -693,7 +693,7 @@ crt_init_opt(crt_group_id_t grpid, uint32_t flags, crt_init_options_t *opt) else D_DEBUG(DB_ALL, "set group_config_path as %s.\n", path); } - d_free_env_str(&path); + d_freeenv_str(&path); if (opt && opt->cio_auth_key) D_STRNDUP(auth_key_env, opt->cio_auth_key, strlen(opt->cio_auth_key)); @@ -896,11 +896,11 @@ crt_init_opt(crt_group_id_t grpid, uint32_t flags, crt_init_options_t *opt) D_FREE(domain0); D_FREE(provider_str0); D_FREE(auth_key0); - d_free_env_str(&port_str); - d_free_env_str(&domain_env); - d_free_env_str(&interface_env); - d_free_env_str(&provider_env); - d_free_env_str(&auth_key_env); + d_freeenv_str(&port_str); + d_freeenv_str(&domain_env); + d_freeenv_str(&interface_env); + d_freeenv_str(&provider_env); + d_freeenv_str(&auth_key_env); if (rc != 0) { D_ERROR("failed, "DF_RC"\n", DP_RC(rc)); diff --git a/src/cart/utils/crt_utils.c b/src/cart/utils/crt_utils.c index 8c2a04da25a7..4b4e53f3cc4a 100644 --- a/src/cart/utils/crt_utils.c +++ b/src/cart/utils/crt_utils.c @@ -106,7 +106,7 @@ write_completion_file(void) "DAOS_TEST_SHARED_DIR must be set for --write_completion_file " "option.\n"); D_ASPRINTF(completion_file, "%s/test-servers-completed.txt.%d", dir, getpid()); - d_free_env_str(&dir); + d_freeenv_str(&dir); D_ASSERTF(completion_file != NULL, "Error allocating completion_file string\n"); unlink(completion_file); @@ -424,7 +424,7 @@ crtu_dc_mgmt_net_print_env(void) D_ASSERTF(env != NULL, "Can not retrieve environment varirable %s: " DF_RC "\n", var_names[0], DP_RC(rc)); D_ASPRINTF(msg, "CaRT env setup with:\n\t%s=%s", var_names[0], env); - d_free_env_str(&env); + d_freeenv_str(&env); if (msg == NULL) { D_INFO("Error allocating CaRT env setup message"); return; @@ -438,7 +438,7 @@ crtu_dc_mgmt_net_print_env(void) var_names[idx], DP_RC(rc)); D_ASPRINTF(msg, "%s, %s=%s", tmp, var_names[idx], env); - d_free_env_str(&env); + d_freeenv_str(&env); D_FREE(tmp); if (msg == NULL) { D_INFO("Error allocating CaRT env setup message"); @@ -500,7 +500,7 @@ crtu_dc_mgmt_net_cfg_setenv(const char *name) if (cli_srx_set) { D_ERROR("Client set FI_OFI_RXM_USE_SRX to %s, " "but server is unset!\n", cli_srx_set); - d_free_env_str(&cli_srx_set); + d_freeenv_str(&cli_srx_set); D_GOTO(cleanup, rc = -DER_INVAL); } } @@ -515,7 +515,7 @@ crtu_dc_mgmt_net_cfg_setenv(const char *name) D_GOTO(cleanup, rc = d_errno2der(errno)); } else { D_DEBUG(DB_MGMT, "Using client provided CRT_TIMEOUT: %s\n", crt_timeout); - d_free_env_str(&crt_timeout); + d_freeenv_str(&crt_timeout); } d_agetenv_str(&ofi_interface, "OFI_INTERFACE"); @@ -528,7 +528,7 @@ crtu_dc_mgmt_net_cfg_setenv(const char *name) D_DEBUG(DB_MGMT, "Using client provided OFI_INTERFACE: %s\n", ofi_interface); - d_free_env_str(&ofi_interface); + d_freeenv_str(&ofi_interface); } d_agetenv_str(&ofi_domain, "OFI_DOMAIN"); @@ -539,7 +539,7 @@ crtu_dc_mgmt_net_cfg_setenv(const char *name) D_GOTO(cleanup, rc = d_errno2der(errno)); } else { D_DEBUG(DB_MGMT, "Using client provided OFI_DOMAIN: %s\n", ofi_domain); - d_free_env_str(&ofi_domain); + d_freeenv_str(&ofi_domain); } crtu_dc_mgmt_net_print_env(); @@ -623,7 +623,7 @@ crtu_cli_start_basic(char *local_group_name, char *srv_group_name, rc = crtu_load_group_from_file(grp_cfg_file, *crt_ctx, *grp, -1, true); - d_free_env_str(&grp_cfg_file); + d_freeenv_str(&grp_cfg_file); if (rc != 0) D_GOTO(out, rc); } @@ -744,7 +744,7 @@ crtu_srv_start_basic(char *srv_group_name, crt_context_t *crt_ctx, /* load group info from a config file and delete file upon return */ rc = crtu_load_group_from_file(grp_cfg_file, crt_ctx[0], *grp, my_rank, true); - d_free_env_str(&grp_cfg_file); + d_freeenv_str(&grp_cfg_file); if (rc != 0) D_GOTO(out, rc); diff --git a/src/client/api/agent.c b/src/client/api/agent.c index b1fe562df9c4..ede098eb1655 100644 --- a/src/client/api/agent.c +++ b/src/client/api/agent.c @@ -21,7 +21,7 @@ dc_agent_init() DAOS_AGENT_DRPC_SOCK_NAME); else D_STRNDUP_S(path, DEFAULT_DAOS_AGENT_DRPC_SOCK); - d_free_env_str(&envpath); + d_freeenv_str(&envpath); if (path == NULL) return -DER_NOMEM; diff --git a/src/client/api/job.c b/src/client/api/job.c index 045d6381353e..c184c7708401 100644 --- a/src/client/api/job.c +++ b/src/client/api/job.c @@ -47,7 +47,7 @@ dc_job_init(void) char *tmp_env = jobid_env; D_STRNDUP(jobid_env, tmp_env, MAX_ENV_NAME); - d_free_env_str(&tmp_env); + d_freeenv_str(&tmp_env); } if (jobid_env == NULL) D_GOTO(out_err, err = -DER_NOMEM); @@ -63,7 +63,7 @@ dc_job_init(void) char *tmp_jobid = jobid; D_STRNDUP(jobid, tmp_jobid, MAX_JOBID_LEN); - d_free_env_str(&tmp_jobid); + d_freeenv_str(&tmp_jobid); if (jobid == NULL) D_GOTO(out_env, err = -DER_NOMEM); } diff --git a/src/client/dfuse/pil4dfs/int_dfs.c b/src/client/dfuse/pil4dfs/int_dfs.c index 2d69517144b9..98372a8b828c 100644 --- a/src/client/dfuse/pil4dfs/int_dfs.c +++ b/src/client/dfuse/pil4dfs/int_dfs.c @@ -681,9 +681,9 @@ discover_daos_mount_with_env(void) free_fs_root: D_FREE(dfs_list[num_dfs].fs_root); out: - d_free_env_str(&container); - d_free_env_str(&pool); - d_free_env_str(&fs_root); + d_freeenv_str(&container); + d_freeenv_str(&pool); + d_freeenv_str(&fs_root); return rc; } @@ -5546,7 +5546,7 @@ init_myhook(void) report = true; if (strncmp(env_log, "0", 2) == 0 || strncasecmp(env_log, "false", 6) == 0) report = false; - d_free_env_str(&env_log); + d_freeenv_str(&env_log); } /* Find dfuse mounts from /proc/mounts */ diff --git a/src/client/pydaos/pydaos_shim.c b/src/client/pydaos/pydaos_shim.c index 88fbd7cc92ed..1100ec7a3682 100644 --- a/src/client/pydaos/pydaos_shim.c +++ b/src/client/pydaos/pydaos_shim.c @@ -115,7 +115,7 @@ __shim_handle__daos_init(PyObject *self, PyObject *args) use_glob_eq = 0; } } - d_free_env_str(&override); + d_freeenv_str(&override); } return PyInt_FromLong(rc); diff --git a/src/common/debug.c b/src/common/debug.c index 730b5b2a9aa4..b586f0e50d3e 100644 --- a/src/common/debug.c +++ b/src/common/debug.c @@ -131,7 +131,7 @@ io_bypass_init(void) } tok = str; }; - d_free_env_str(&env); + d_freeenv_str(&env); } void @@ -168,15 +168,15 @@ daos_debug_init_ex(char *logfile, d_dbug_t logmask) rc = d_agetenv_str(&logfile, D_LOG_FILE_ENV); if (logfile == NULL || strlen(logfile) == 0) { flags |= DLOG_FLV_STDOUT; - d_free_env_str(&logfile); + d_freeenv_str(&logfile); } else if (!strncmp(logfile, "/dev/null", 9)) { /* Don't set up logging or log to stdout if the log file is /dev/null */ - d_free_env_str(&logfile); + d_freeenv_str(&logfile); } rc = d_log_init_adv("DAOS", logfile, flags, logmask, DLOG_CRIT, log_id_cb); - d_free_env_str(&logfile); + d_freeenv_str(&logfile); if (rc != 0) { D_PRINT_ERR("Failed to init DAOS debug log: "DF_RC"\n", DP_RC(rc)); diff --git a/src/common/misc.c b/src/common/misc.c index 9f44f17cc3db..afd8ed8fa38e 100644 --- a/src/common/misc.c +++ b/src/common/misc.c @@ -689,10 +689,10 @@ daos_crt_init_opt_get(bool server, int ctx_nr) strncmp(addr_env, CRT_SOCKET_PROV, strlen(CRT_SOCKET_PROV)) == 0) { D_INFO("for sockets provider force it to use regular EP.\n"); daos_crt_init_opt.cio_use_sep = 0; - d_free_env_str(&addr_env); + d_freeenv_str(&addr_env); goto out; } - d_free_env_str(&addr_env); + d_freeenv_str(&addr_env); daos_crt_init_opt.cio_use_sep = 1; diff --git a/src/engine/srv.c b/src/engine/srv.c index 5adcf45514b0..0afc13861d15 100644 --- a/src/engine/srv.c +++ b/src/engine/srv.c @@ -1055,7 +1055,7 @@ dss_xstreams_init(void) D_WARN("Invalid relax mode [%s]\n", env); sched_relax_mode = SCHED_RELAX_MODE_NET; } - d_free_env_str(&env); + d_freeenv_str(&env); } D_INFO("CPU relax mode is set to [%s]\n", sched_relax_mode2str(sched_relax_mode)); diff --git a/src/gurt/debug.c b/src/gurt/debug.c index 4b99e24e834a..bc672c03067e 100644 --- a/src/gurt/debug.c +++ b/src/gurt/debug.c @@ -395,7 +395,7 @@ debug_prio_err_load_env(void) /* invalid DD_STDERR option */ if (d_dbglog_data.dd_prio_err == 0) D_PRINT_ERR("DD_STDERR = %s - invalid option\n", env); - d_free_env_str(&env); + d_freeenv_str(&env); } void @@ -424,8 +424,8 @@ d_log_sync_mask(void) d_log_sync_mask_ex(log_mask, dd_mask); - d_free_env_str(&dd_mask); - d_free_env_str(&log_mask); + d_freeenv_str(&dd_mask); + d_freeenv_str(&log_mask); } /** @@ -553,12 +553,12 @@ d_log_init(void) d_agetenv_str(&log_file, D_LOG_FILE_ENV); if (log_file == NULL || strlen(log_file) == 0) { flags |= DLOG_FLV_STDOUT; - d_free_env_str(&log_file); + d_freeenv_str(&log_file); } rc = d_log_init_adv("CaRT", log_file, flags, DLOG_WARN, DLOG_EMERG, NULL); - d_free_env_str(&log_file); + d_freeenv_str(&log_file); if (rc != DER_SUCCESS) { D_PRINT_ERR("d_log_init_adv failed, rc: %d.\n", rc); D_GOTO(out, rc); diff --git a/src/gurt/dlog.c b/src/gurt/dlog.c index 7cbce2fa7b6e..2f1324463c08 100644 --- a/src/gurt/dlog.c +++ b/src/gurt/dlog.c @@ -847,20 +847,20 @@ d_log_open(char *tag, int maxfac_hint, int default_mask, int stderr_mask, if (pri != -1) mst.flush_pri = pri; - d_free_env_str(&env); + d_freeenv_str(&env); } d_agetenv_str(&env, D_LOG_TRUNCATE_ENV); if (env != NULL && atoi(env) > 0) truncate = 1; - d_free_env_str(&env); + d_freeenv_str(&env); d_agetenv_str(&env, D_LOG_SIZE_ENV); if (env != NULL) { log_size = d_getenv_size(env); if (log_size < LOG_SIZE_MIN) log_size = LOG_SIZE_MIN; - d_free_env_str(&env); + d_freeenv_str(&env); } d_agetenv_str(&env, D_LOG_FILE_APPEND_PID_ENV); @@ -875,12 +875,12 @@ d_log_open(char *tag, int maxfac_hint, int default_mask, int stderr_mask, "continuing.\n"); } } - d_free_env_str(&env); + d_freeenv_str(&env); d_agetenv_str(&env, D_LOG_FILE_APPEND_RANK_ENV); if (env && strcmp(env, "0") != 0) mst.append_rank = true; - d_free_env_str(&env); + d_freeenv_str(&env); /* quick sanity check (mst.tag is non-null if already open) */ if (d_log_xst.tag || !tag || @@ -918,7 +918,7 @@ d_log_open(char *tag, int maxfac_hint, int default_mask, int stderr_mask, d_agetenv_str(&env, D_LOG_STDERR_IN_LOG_ENV); if (env != NULL && atoi(env) > 0) merge_stderr = true; - d_free_env_str(&env); + d_freeenv_str(&env); if (!truncate) log_flags |= O_APPEND; @@ -1107,7 +1107,7 @@ bool d_logfac_is_enabled(const char *fac_name) rc = true; out: - d_free_env_str(&ddsubsys_env); + d_freeenv_str(&ddsubsys_env); return rc; } diff --git a/src/gurt/fault_inject.c b/src/gurt/fault_inject.c index 4ffbd2c40e4f..f5225bab3dd5 100644 --- a/src/gurt/fault_inject.c +++ b/src/gurt/fault_inject.c @@ -616,7 +616,7 @@ d_fault_inject_init(void) out: if (fp) fclose(fp); - d_free_env_str(&config_file); + d_freeenv_str(&config_file); return rc; } diff --git a/src/gurt/misc.c b/src/gurt/misc.c index 3b287ca73ff9..d92055a905d4 100644 --- a/src/gurt/misc.c +++ b/src/gurt/misc.c @@ -1120,7 +1120,7 @@ d_agetenv_str(char **str_val, const char *name) * \param[in,out] str_val Copy of an environment string value. */ void -d_free_env_str(char **str_val) +d_freeenv_str(char **str_val) { assert(str_val != NULL); diff --git a/src/gurt/tests/test_gurt.c b/src/gurt/tests/test_gurt.c index ebb9a0ec7017..e9f8f4354867 100644 --- a/src/gurt/tests/test_gurt.c +++ b/src/gurt/tests/test_gurt.c @@ -2140,7 +2140,7 @@ test_d_agetenv_str(void **state) assert_int_equal(rc, -DER_SUCCESS); assert_non_null(env); assert_string_equal(env, "bar"); - d_free_env_str(&env); + d_freeenv_str(&env); assert_null(env); getenv_return = ""; @@ -2148,7 +2148,7 @@ test_d_agetenv_str(void **state) assert_int_equal(rc, -DER_SUCCESS); assert_non_null(env); assert_string_equal(env, ""); - d_free_env_str(&env); + d_freeenv_str(&env); assert_null(env); getenv_return = NULL; diff --git a/src/include/gurt/common.h b/src/include/gurt/common.h index 1cf40fc3292c..164421174a00 100644 --- a/src/include/gurt/common.h +++ b/src/include/gurt/common.h @@ -581,7 +581,7 @@ d_getenv_str(char *str_val, size_t str_size, const char *name); int d_agetenv_str(char **str_val, const char *name); void -d_free_env_str(char **str_val); +d_freeenv_str(char **str_val); int d_getenv_bool(const char *name, bool *bool_val); int diff --git a/src/mgmt/cli_mgmt.c b/src/mgmt/cli_mgmt.c index 2bd6031ceb64..0a17eb7c7a6b 100644 --- a/src/mgmt/cli_mgmt.c +++ b/src/mgmt/cli_mgmt.c @@ -455,7 +455,7 @@ print_mgmt_net_env() D_ASSERTF(env != NULL, "Can not retrieve environment varirable OFI_INTERFACE: " DF_RC "\n", DP_RC(rc)); D_ASPRINTF(msg, "Network Interface: %s", env); - d_free_env_str(&env); + d_freeenv_str(&env); if (msg == NULL) { D_INFO("Error allocating CaRT initialization message"); return; @@ -465,14 +465,14 @@ print_mgmt_net_env() D_INFO("%s, Domain: NA", msg); else D_INFO("%s, Domain: %s", msg, env); - d_free_env_str(&env); + d_freeenv_str(&env); D_FREE(msg); rc = d_agetenv_str(&env, var_names[0]); D_ASSERTF(env != NULL, "Can not retrieve environment varirable %s: " DF_RC "\n", var_names[0], DP_RC(rc)); D_ASPRINTF(msg, "CaRT initialization with:\n\t%s=%s", var_names[0], env); - d_free_env_str(&env); + d_freeenv_str(&env); if (msg == NULL) { D_INFO("Error allocating CaRT initialization message"); return; @@ -486,7 +486,7 @@ print_mgmt_net_env() var_names[idx], DP_RC(rc)); D_ASPRINTF(msg, "%s, %s=%s", tmp, var_names[idx], env); - d_free_env_str(&env); + d_freeenv_str(&env); D_FREE(tmp); if (msg == NULL) { D_INFO("Error allocating CaRT initialization message"); @@ -570,7 +570,7 @@ int dc_mgmt_net_cfg(const char *name) if (cli_srx_set) { D_ERROR("Client set FI_OFI_RXM_USE_SRX to %s, " "but server is unset!\n", cli_srx_set); - d_free_env_str(&cli_srx_set); + d_freeenv_str(&cli_srx_set); D_GOTO(cleanup, rc = -DER_INVAL); } } @@ -585,7 +585,7 @@ int dc_mgmt_net_cfg(const char *name) } else { D_INFO("Using client provided CRT_TIMEOUT: %s\n", crt_timeout); - d_free_env_str(&crt_timeout); + d_freeenv_str(&crt_timeout); } d_agetenv_str(&ofi_interface, "OFI_INTERFACE"); @@ -593,7 +593,7 @@ int dc_mgmt_net_cfg(const char *name) if (!ofi_interface) { rc = d_setenv("OFI_INTERFACE", info.interface, 1); if (rc != 0) { - d_free_env_str(&ofi_domain); + d_freeenv_str(&ofi_domain); D_GOTO(cleanup, rc = d_errno2der(errno)); } @@ -607,7 +607,7 @@ int dc_mgmt_net_cfg(const char *name) rc = d_setenv("OFI_DOMAIN", info.domain, 1); if (rc != 0) { - d_free_env_str(&ofi_domain); + d_freeenv_str(&ofi_domain); D_GOTO(cleanup, rc = d_errno2der(errno)); } } else { @@ -617,8 +617,8 @@ int dc_mgmt_net_cfg(const char *name) if (ofi_domain) D_INFO("Using client provided OFI_DOMAIN: %s\n", ofi_domain); } - d_free_env_str(&ofi_domain); - d_free_env_str(&ofi_interface); + d_freeenv_str(&ofi_domain); + d_freeenv_str(&ofi_interface); print_mgmt_net_env(); @@ -646,7 +646,7 @@ int dc_mgmt_net_cfg_check(const char *name) if (cli_srx_set) { D_ERROR("Client set FI_OFI_RXM_USE_SRX to %s, " "but server is unset!\n", cli_srx_set); - d_free_env_str(&cli_srx_set); + d_freeenv_str(&cli_srx_set); rc = -DER_INVAL; goto out; } diff --git a/src/pool/srv_pool.c b/src/pool/srv_pool.c index 0d8a81d9c009..c86b06eda25d 100644 --- a/src/pool/srv_pool.c +++ b/src/pool/srv_pool.c @@ -6869,10 +6869,10 @@ pool_svc_update_map(struct pool_svc *svc, crt_opcode_t opc, bool exclude_rank, if ((env && !strcasecmp(env, REBUILD_ENV_DISABLED)) || daos_fail_check(DAOS_REBUILD_DISABLE)) { D_DEBUG(DB_TRACE, "Rebuild is disabled\n"); - d_free_env_str(&env); + d_freeenv_str(&env); D_GOTO(out, rc = 0); } - d_free_env_str(&env); + d_freeenv_str(&env); rc = ds_pool_iv_prop_fetch(svc->ps_pool, &prop); if (rc) diff --git a/src/rsvc/srv.c b/src/rsvc/srv.c index 871e2d276230..97a03f1f013d 100644 --- a/src/rsvc/srv.c +++ b/src/rsvc/srv.c @@ -1393,7 +1393,7 @@ ds_rsvc_get_md_cap(void) if (v == NULL) return size_default; n = atoi(v); - d_free_env_str(&v); + d_freeenv_str(&v); if ((n << 20) < MINIMUM_DAOS_MD_CAP_SIZE) { D_ERROR("metadata capacity too low; using %zu MB\n", size_default >> 20); diff --git a/src/tests/ftest/cart/iv_server.c b/src/tests/ftest/cart/iv_server.c index 45d12048eb2e..1e823972362b 100644 --- a/src/tests/ftest/cart/iv_server.c +++ b/src/tests/ftest/cart/iv_server.c @@ -1248,7 +1248,7 @@ int main(int argc, char **argv) } my_rank = atoi(env_self_rank); - d_free_env_str(&env_self_rank); + d_freeenv_str(&env_self_rank); /* rank, num_attach_retries, is_server, assert_on_error */ crtu_test_init(my_rank, 20, true, true); @@ -1289,7 +1289,7 @@ int main(int argc, char **argv) D_ERROR("Failed to load group file %s\n", grp_cfg_file); assert(0); } - d_free_env_str(&grp_cfg_file); + d_freeenv_str(&grp_cfg_file); /* Start the server for myself */ DBG_PRINT("Server starting, self_rank=%d\n", my_rank); diff --git a/src/tests/ftest/cart/no_pmix_corpc_errors.c b/src/tests/ftest/cart/no_pmix_corpc_errors.c index 386682d4f064..c69e4d900bdc 100644 --- a/src/tests/ftest/cart/no_pmix_corpc_errors.c +++ b/src/tests/ftest/cart/no_pmix_corpc_errors.c @@ -273,7 +273,7 @@ int main(int argc, char **argv) d_agetenv_str(&env_self_rank, "CRT_L_RANK"); my_rank = atoi(env_self_rank); - d_free_env_str(&env_self_rank); + d_freeenv_str(&env_self_rank); /* rank, num_attach_retries, is_server, assert_on_error */ crtu_test_init(my_rank, 20, true, true); @@ -352,7 +352,7 @@ int main(int argc, char **argv) DBG_PRINT("self_rank=%d uri=%s grp_cfg_file=%s\n", my_rank, my_uri, grp_cfg_file); - d_free_env_str(&grp_cfg_file); + d_freeenv_str(&grp_cfg_file); D_FREE(my_uri); rc = crt_group_size(NULL, &grp_size); diff --git a/src/tests/ftest/cart/no_pmix_group_test.c b/src/tests/ftest/cart/no_pmix_group_test.c index 485a42a94704..7290b478aa53 100644 --- a/src/tests/ftest/cart/no_pmix_group_test.c +++ b/src/tests/ftest/cart/no_pmix_group_test.c @@ -320,7 +320,7 @@ int main(int argc, char **argv) d_agetenv_str(&env_self_rank, "CRT_L_RANK"); my_rank = atoi(env_self_rank); - d_free_env_str(&env_self_rank); + d_freeenv_str(&env_self_rank); /* When under valgrind bump expected timeouts to 60 seconds */ if (D_ON_VALGRIND) { @@ -408,7 +408,7 @@ int main(int argc, char **argv) DBG_PRINT("self_rank=%d uri=%s grp_cfg_file=%s\n", my_rank, my_uri, grp_cfg_file); - d_free_env_str(&grp_cfg_file); + d_freeenv_str(&grp_cfg_file); D_FREE(my_uri); rc = crt_group_size(NULL, &grp_size); diff --git a/src/tests/ftest/cart/no_pmix_group_version.c b/src/tests/ftest/cart/no_pmix_group_version.c index 629e4f7bd00f..f3fab3dce0ca 100644 --- a/src/tests/ftest/cart/no_pmix_group_version.c +++ b/src/tests/ftest/cart/no_pmix_group_version.c @@ -270,7 +270,7 @@ int main(int argc, char **argv) d_agetenv_str(&env_self_rank, "CRT_L_RANK"); my_rank = atoi(env_self_rank); - d_free_env_str(&env_self_rank); + d_freeenv_str(&env_self_rank); /* When under valgrind bump expected timeouts to 60 seconds */ if (D_ON_VALGRIND) { @@ -352,7 +352,7 @@ int main(int argc, char **argv) DBG_PRINT("self_rank=%d uri=%s grp_cfg_file=%s\n", my_rank, my_uri, grp_cfg_file); - d_free_env_str(&grp_cfg_file); + d_freeenv_str(&grp_cfg_file); D_FREE(my_uri); rc = crt_group_size(NULL, &grp_size); diff --git a/src/tests/ftest/cart/no_pmix_launcher_client.c b/src/tests/ftest/cart/no_pmix_launcher_client.c index 1db5cabeab99..24999ee51c3c 100644 --- a/src/tests/ftest/cart/no_pmix_launcher_client.c +++ b/src/tests/ftest/cart/no_pmix_launcher_client.c @@ -116,7 +116,7 @@ int main(int argc, char **argv) D_ERROR("crtu_load_group_from_file() failed; rc=%d\n", rc); assert(0); } - d_free_env_str(&grp_cfg_file); + d_freeenv_str(&grp_cfg_file); rc = crt_group_size(grp, &grp_size); if (rc != 0) { diff --git a/src/tests/ftest/cart/no_pmix_launcher_server.c b/src/tests/ftest/cart/no_pmix_launcher_server.c index 7fbba5b179bf..e19ce0810cc5 100644 --- a/src/tests/ftest/cart/no_pmix_launcher_server.c +++ b/src/tests/ftest/cart/no_pmix_launcher_server.c @@ -35,7 +35,7 @@ int main(int argc, char **argv) d_agetenv_str(&env_self_rank, "CRT_L_RANK"); my_rank = atoi(env_self_rank); - d_free_env_str(&env_self_rank); + d_freeenv_str(&env_self_rank); /* rank, num_attach_retries, is_server, assert_on_error */ crtu_test_init(my_rank, 20, true, true); @@ -106,7 +106,7 @@ int main(int argc, char **argv) DBG_PRINT("self_rank=%d uri=%s grp_cfg_file=%s\n", my_rank, my_uri, grp_cfg_file); - d_free_env_str(&grp_cfg_file); + d_freeenv_str(&grp_cfg_file); D_FREE(my_uri); rc = crt_group_size(NULL, &grp_size); diff --git a/src/tests/ftest/cart/test_corpc_exclusive.c b/src/tests/ftest/cart/test_corpc_exclusive.c index 3cb256f1536c..b3d81d857f7e 100644 --- a/src/tests/ftest/cart/test_corpc_exclusive.c +++ b/src/tests/ftest/cart/test_corpc_exclusive.c @@ -105,7 +105,7 @@ int main(void) d_agetenv_str(&env_self_rank, "CRT_L_RANK"); my_rank = atoi(env_self_rank); - d_free_env_str(&env_self_rank); + d_freeenv_str(&env_self_rank); /* rank, num_attach_retries, is_server, assert_on_error */ crtu_test_init(my_rank, 20, true, true); @@ -147,7 +147,7 @@ int main(void) /* load group info from a config file and delete file upon return */ rc = crtu_load_group_from_file(grp_cfg_file, g_main_ctx, grp, my_rank, true); - d_free_env_str(&grp_cfg_file); + d_freeenv_str(&grp_cfg_file); if (rc != 0) { D_ERROR("crtu_load_group_from_file() failed; rc=%d\n", rc); assert(0); diff --git a/src/tests/ftest/cart/test_corpc_prefwd.c b/src/tests/ftest/cart/test_corpc_prefwd.c index c2296ac1b433..8aa9480476e9 100644 --- a/src/tests/ftest/cart/test_corpc_prefwd.c +++ b/src/tests/ftest/cart/test_corpc_prefwd.c @@ -127,7 +127,7 @@ int main(void) d_agetenv_str(&env_self_rank, "CRT_L_RANK"); my_rank = atoi(env_self_rank); - d_free_env_str(&env_self_rank); + d_freeenv_str(&env_self_rank); /* rank, num_attach_retries, is_server, assert_on_error */ crtu_test_init(my_rank, 20, true, true); @@ -169,7 +169,7 @@ int main(void) /* load group info from a config file and delete file upon return */ rc = crtu_load_group_from_file(grp_cfg_file, g_main_ctx, grp, my_rank, true); - d_free_env_str(&grp_cfg_file); + d_freeenv_str(&grp_cfg_file); if (rc != 0) { D_ERROR("crtu_load_group_from_file() failed; rc=%d\n", rc); assert(0); diff --git a/src/tests/ftest/cart/test_ep_cred_server.c b/src/tests/ftest/cart/test_ep_cred_server.c index cf01483ec540..29e66ae960d6 100644 --- a/src/tests/ftest/cart/test_ep_cred_server.c +++ b/src/tests/ftest/cart/test_ep_cred_server.c @@ -75,7 +75,7 @@ main(int argc, char **argv) d_agetenv_str(&env_self_rank, "CRT_L_RANK"); my_rank = atoi(env_self_rank); - d_free_env_str(&env_self_rank); + d_freeenv_str(&env_self_rank); /* rank, num_attach_retries, is_server, assert_on_error */ crtu_test_init(my_rank, 40, true, true); diff --git a/src/tests/ftest/cart/test_group_np_srv.c b/src/tests/ftest/cart/test_group_np_srv.c index 2babea4730a0..1353be76983b 100644 --- a/src/tests/ftest/cart/test_group_np_srv.c +++ b/src/tests/ftest/cart/test_group_np_srv.c @@ -153,7 +153,7 @@ int main(int argc, char **argv) d_agetenv_str(&env_self_rank, "CRT_L_RANK"); my_rank = atoi(env_self_rank); - d_free_env_str(&env_self_rank); + d_freeenv_str(&env_self_rank); /* rank, num_attach_retries, is_server, assert_on_error */ crtu_test_init(my_rank, 20, true, true); diff --git a/src/tests/ftest/cart/test_multisend_server.c b/src/tests/ftest/cart/test_multisend_server.c index c0aca390003c..ee770ec9b4e0 100644 --- a/src/tests/ftest/cart/test_multisend_server.c +++ b/src/tests/ftest/cart/test_multisend_server.c @@ -169,7 +169,7 @@ main(int argc, char **argv) d_agetenv_str(&env_self_rank, "CRT_L_RANK"); my_rank = atoi(env_self_rank); - d_free_env_str(&env_self_rank); + d_freeenv_str(&env_self_rank); /* rank, num_attach_retries, is_server, assert_on_error */ crtu_test_init(my_rank, 40, true, true); diff --git a/src/tests/ftest/cart/test_proto_server.c b/src/tests/ftest/cart/test_proto_server.c index 3096020323a7..5fb587b94df9 100644 --- a/src/tests/ftest/cart/test_proto_server.c +++ b/src/tests/ftest/cart/test_proto_server.c @@ -85,7 +85,7 @@ main(int argc, char **argv) d_agetenv_str(&env_self_rank, "CRT_L_RANK"); my_rank = atoi(env_self_rank); - d_free_env_str(&env_self_rank); + d_freeenv_str(&env_self_rank); /* rank, num_attach_retries, is_server, assert_on_error */ crtu_test_init(my_rank, 40, true, true); diff --git a/src/tests/ftest/cart/test_rpc_to_ghost_rank.c b/src/tests/ftest/cart/test_rpc_to_ghost_rank.c index febb74ebca4b..0e7741d364b5 100644 --- a/src/tests/ftest/cart/test_rpc_to_ghost_rank.c +++ b/src/tests/ftest/cart/test_rpc_to_ghost_rank.c @@ -509,7 +509,7 @@ int main(int argc, char **argv) d_agetenv_str(&env_self_rank, "CRT_L_RANK"); my_rank = atoi(env_self_rank); - d_free_env_str(&env_self_rank); + d_freeenv_str(&env_self_rank); /* rank, num_attach_retries, is_server, assert_on_error */ crtu_test_init(my_rank, 20, true, true); diff --git a/src/tests/suite/daos_nvme_recovery.c b/src/tests/suite/daos_nvme_recovery.c index 8da208e48123..545814129021 100644 --- a/src/tests/suite/daos_nvme_recovery.c +++ b/src/tests/suite/daos_nvme_recovery.c @@ -90,7 +90,7 @@ nvme_fault_reaction(void **state, int mode) d_agetenv_str(&env, "POOL_SCM_SIZE"); if (env) { size_gb = atoi(env); - d_free_env_str(&env); + d_freeenv_str(&env); if (size_gb != 0) scm_size = (daos_size_t)size_gb << 30; } diff --git a/src/tests/suite/daos_test_common.c b/src/tests/suite/daos_test_common.c index 8f83aaa215c3..ac7e5c2015a4 100644 --- a/src/tests/suite/daos_test_common.c +++ b/src/tests/suite/daos_test_common.c @@ -73,7 +73,7 @@ test_setup_pool_create(void **state, struct test_pool *ipool, d_agetenv_str(&env, "POOL_SCM_SIZE"); if (env) { size_gb = atoi(env); - d_free_env_str(&env); + d_freeenv_str(&env); if (size_gb != 0) outpool->pool_size = (daos_size_t)size_gb << 30; @@ -89,7 +89,7 @@ test_setup_pool_create(void **state, struct test_pool *ipool, d_agetenv_str(&env, "POOL_NVME_SIZE"); if (env) { size_gb = atoi(env); - d_free_env_str(&env); + d_freeenv_str(&env); nvme_size = (daos_size_t)size_gb << 30; } diff --git a/src/utils/self_test/self_test.c b/src/utils/self_test/self_test.c index d44f10335b5d..127d63566347 100644 --- a/src/utils/self_test/self_test.c +++ b/src/utils/self_test/self_test.c @@ -1853,7 +1853,7 @@ int main(int argc, char *argv[]) printf("Warning: running without daos_agent connection (-u option); " "Using attachment file %s/%s.attach_info_tmp instead\n", attach_path, dest_name ? dest_name : default_dest_name); - d_free_env_str(&attach_path); + d_freeenv_str(&attach_path); } /******************** Parse message sizes argument ********************/ diff --git a/src/vos/vos_common.c b/src/vos/vos_common.c index 9e9dfaff2101..ea4cdd45c12f 100644 --- a/src/vos/vos_common.c +++ b/src/vos/vos_common.c @@ -996,7 +996,7 @@ vos_self_init(const char *db_path, bool use_sys_db, int tgt_id) vos_evt_feats &= ~EVT_FEATS_SUPPORTED; vos_evt_feats |= EVT_FEAT_SORT_DIST_EVEN; } - d_free_env_str(&evt_mode); + d_freeenv_str(&evt_mode); } switch (vos_evt_feats & EVT_FEATS_SUPPORTED) { case EVT_FEAT_SORT_SOFF: