diff options
Diffstat (limited to 'source4/heimdal/lib/gssapi/get_mic.c')
-rw-r--r-- | source4/heimdal/lib/gssapi/get_mic.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source4/heimdal/lib/gssapi/get_mic.c b/source4/heimdal/lib/gssapi/get_mic.c index 1c950e95d9..fc9e9aa1a9 100644 --- a/source4/heimdal/lib/gssapi/get_mic.c +++ b/source4/heimdal/lib/gssapi/get_mic.c @@ -33,7 +33,7 @@ #include "gssapi_locl.h" -RCSID("$Id: get_mic.c,v 1.29 2005/01/05 02:52:12 lukeh Exp $"); +RCSID("$Id: get_mic.c,v 1.30 2006/04/02 02:12:52 lha Exp $"); static OM_uint32 mic_des @@ -59,6 +59,7 @@ mic_des message_token->length = total_len; message_token->value = malloc (total_len); if (message_token->value == NULL) { + message_token->length = 0; *minor_status = ENOMEM; return GSS_S_FAILURE; } @@ -150,6 +151,7 @@ mic_des3 message_token->length = total_len; message_token->value = malloc (total_len); if (message_token->value == NULL) { + message_token->length = 0; *minor_status = ENOMEM; return GSS_S_FAILURE; } @@ -179,6 +181,8 @@ mic_des3 kret = krb5_crypto_init(gssapi_krb5_context, key, 0, &crypto); if (kret) { free (message_token->value); + message_token->value = NULL; + message_token->length = 0; free (tmp); gssapi_krb5_set_error_string (); *minor_status = kret; @@ -196,6 +200,8 @@ mic_des3 krb5_crypto_destroy (gssapi_krb5_context, crypto); if (kret) { free (message_token->value); + message_token->value = NULL; + message_token->length = 0; gssapi_krb5_set_error_string (); *minor_status = kret; return GSS_S_FAILURE; @@ -221,6 +227,8 @@ mic_des3 ETYPE_DES3_CBC_NONE, &crypto); if (kret) { free (message_token->value); + message_token->value = NULL; + message_token->length = 0; gssapi_krb5_set_error_string (); *minor_status = kret; return GSS_S_FAILURE; @@ -238,6 +246,8 @@ mic_des3 krb5_crypto_destroy (gssapi_krb5_context, crypto); if (kret) { free (message_token->value); + message_token->value = NULL; + message_token->length = 0; gssapi_krb5_set_error_string (); *minor_status = kret; return GSS_S_FAILURE; |