diff --git a/src/slurmd/common/task_plugin.c b/src/slurmd/common/task_plugin.c
index e71356f7313afd875e282a2b39e38eb7aeace365..5d9c129e0e04a429a0388f019a832c51cf99d817 100644
--- a/src/slurmd/common/task_plugin.c
+++ b/src/slurmd/common/task_plugin.c
@@ -351,7 +351,7 @@ extern int pre_launch_priv(slurmd_job_t *job)
 
 	slurm_mutex_lock( &g_task_context_lock );
 	for (i = 0; ((i < g_task_context_num) && (rc == SLURM_SUCCESS)); i++)
-		rc = (*(g_task_context[i]->ops.pre_launch_priv))(job);
+		rc = (*(ops[i].pre_launch_priv))(job);
 	slurm_mutex_unlock( &g_task_context_lock );
 
 	return (rc);