allocate enough memory

This commit is contained in:
Love Hornquist Astrand
2011-05-21 13:25:24 -07:00
parent 58ffee93b7
commit 26085dfbc0

View File

@@ -186,7 +186,7 @@ _gss_ntlm_get_user_cred(const ntlm_name target_name,
static int
_gss_copy_cred(ntlm_cred from, ntlm_cred *to)
{
*to = calloc(1, sizeof(*to));
*to = calloc(1, sizeof(**to));
if (*to == NULL)
return ENOMEM;
(*to)->username = strdup(from->username);