Skip to content
Snippets Groups Projects
Commit 3cf37512 authored by Moe Jette's avatar Moe Jette
Browse files

Eliminate possible memory leak on g_slurm_auth_pack error.

parent f0495e31
No related branches found
No related tags found
No related merge requests found
......@@ -478,13 +478,15 @@ int slurm_send_node_msg(slurm_fd fd, slurm_msg_t * msg)
/*
* Pack auth credential
*/
if (g_slurm_auth_pack(auth_cred, buffer)) {
rc = g_slurm_auth_pack(auth_cred, buffer);
(void) g_slurm_auth_destroy(auth_cred);
if (rc) {
error("authentication: %s",
g_slurm_auth_errstr(g_slurm_auth_errno(auth_cred)));
free_buf(buffer);
slurm_seterrno_ret(SLURM_PROTOCOL_AUTHENTICATION_ERROR);
}
(void) g_slurm_auth_destroy(auth_cred);
/*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment