diff --git a/src/common/slurm_protocol_api.c b/src/common/slurm_protocol_api.c
index b423b9a274b9fb432bce72f0f71cd170da5da204..d519b936f4cfd80fb4653a3957600c25175be8f0 100644
--- a/src/common/slurm_protocol_api.c
+++ b/src/common/slurm_protocol_api.c
@@ -807,7 +807,7 @@ uint32_t slurm_get_priority_weight_qos(void)
 
 /* slurm_get_priority_weight_tres
  * returns the priority weights for TRES' from slurmctld_conf object
- * char * string of configured tres weights.
+ * RET char * string of configured tres weights. MUST be xfreed by caller
  */
 char *slurm_get_priority_weight_tres(void)
 {
@@ -817,7 +817,7 @@ char *slurm_get_priority_weight_tres(void)
 	if (slurmdbd_conf) {
 	} else {
 		conf = slurm_conf_lock();
-		weights = conf->priority_weight_tres;
+		weights = xstrdup(conf->priority_weight_tres);
 		slurm_conf_unlock();
 	}
 
diff --git a/src/plugins/priority/multifactor/priority_multifactor.c b/src/plugins/priority/multifactor/priority_multifactor.c
index 9cfac4237d8b33ed317e863c1e2b376a89b3cb26..43ee8cd8d22758e960f81ac8047964e356206d6e 100644
--- a/src/plugins/priority/multifactor/priority_multifactor.c
+++ b/src/plugins/priority/multifactor/priority_multifactor.c
@@ -1414,6 +1414,7 @@ static void _internal_setup(void)
 		weight_tres = slurm_get_tres_weight_array(tres_weights_str,
 							  slurmctld_tres_cnt);
 	}
+	xfree(tres_weights_str);
 	flags = slurmctld_conf.priority_flags;
 
 	if (priority_debug) {