diff --git a/src/plugins/jobacct_gather/linux/jobacct_gather_linux.c b/src/plugins/jobacct_gather/linux/jobacct_gather_linux.c
index ed466c1f5567bd919c365aebe33cdc06aeb4cbbd..2015a0d3f53bb687092d4616f06a1717e9cc588e 100644
--- a/src/plugins/jobacct_gather/linux/jobacct_gather_linux.c
+++ b/src/plugins/jobacct_gather/linux/jobacct_gather_linux.c
@@ -571,6 +571,7 @@ extern void jobacct_gather_p_poll_data(
 			snprintf(proc_io_file, 256, "/proc/%d/io", pids[i]);
 			_handle_stats(prec_list, proc_stat_file, proc_io_file);
 		}
+		xfree(pids);
 	} else {
 		slurm_mutex_lock(&reading_mutex);