Skip to content

Commit

Permalink
Fix memory leak in _gss_ntlm_release_cred.
Browse files Browse the repository at this point in the history
ntlm_cred is always allocated with calloc, so we need to free the cred
object too, similarly to what _gsskrb5_release_cred does.
  • Loading branch information
Aleksei Martynov authored and nicowilliams committed May 22, 2017
1 parent 23ad434 commit a666bf1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/gssapi/ntlm/release_cred.c
Expand Up @@ -58,6 +58,9 @@ OM_uint32 GSSAPI_CALLCONV _gss_ntlm_release_cred
free(cred->key.data);
}

memset(cred, 0, sizeof(*cred));
free(cred);

return GSS_S_COMPLETE;
}

0 comments on commit a666bf1

Please sign in to comment.