diff --git a/src/common/slurm_cred.c b/src/common/slurm_cred.c index 2e2aa8acf5dd533fe5de9b0725cdb7a2fd544141..61214bbb5e64a61332670d2f7a0dd0d189241f73 100644 --- a/src/common/slurm_cred.c +++ b/src/common/slurm_cred.c @@ -544,13 +544,9 @@ slurm_cred_destroy(slurm_cred_t cred) xassert(cred->magic == CRED_MAGIC); slurm_mutex_lock(&cred->mutex); - if (cred->nodes) - xfree(cred->nodes); - if (cred->ntask) - xfree(cred->ntask); - cred->ntask = NULL; - if (cred->signature) - xfree(cred->signature); + xfree(cred->nodes); + xfree(cred->ntask); + xfree(cred->signature); xassert(cred->magic = ~CRED_MAGIC); slurm_mutex_unlock(&cred->mutex);