diff --git a/src/slurmd/slurmstepd/slurmstepd.c b/src/slurmd/slurmstepd/slurmstepd.c
index e4a4aa418e27badd7bd442839292366df6424ac4..428c78736f9d06886de068d4e03ab1f97d104056 100644
--- a/src/slurmd/slurmstepd/slurmstepd.c
+++ b/src/slurmd/slurmstepd/slurmstepd.c
@@ -165,6 +165,8 @@ ending:
 #ifdef MEMORY_LEAK_DEBUG
 	_step_cleanup(job, msg, rc);
 
+	fini_setproctitle();
+
 	xfree(cli);
 	xfree(self);
 	xfree(conf->hostname);