add some krb5_{set,clear}_error_string

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9937 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
2001-05-14 06:14:52 +00:00
parent ffc0237390
commit d27aa3b62e
65 changed files with 1287 additions and 481 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997 - 2000 Kungliga Tekniska H<>gskolan
* Copyright (c) 1997 - 2001 Kungliga Tekniska H<>gskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -61,8 +61,10 @@ krb5_mk_rep(krb5_context context,
auth_context->keyblock,
&auth_context->local_seqnumber);
body.seq_number = malloc (sizeof(*body.seq_number));
if (body.seq_number == NULL)
if (body.seq_number == NULL) {
krb5_set_error_string (context, "malloc: out of memory");
return ENOMEM;
}
*(body.seq_number) = auth_context->local_seqnumber;
} else
body.seq_number = NULL;
@@ -74,6 +76,7 @@ krb5_mk_rep(krb5_context context,
buf = malloc (buf_size);
if (buf == NULL) {
free_EncAPRepPart (&body);
krb5_set_error_string (context, "malloc: out of memory");
return ENOMEM;
}
@@ -106,6 +109,7 @@ krb5_mk_rep(krb5_context context,
buf = realloc(buf, buf_size);
if(buf == NULL) {
free_AP_REP (&ap);
krb5_set_error_string (context, "malloc: out of memory");
return ENOMEM;
}
ret = encode_AP_REP (buf + buf_size - 1, buf_size, &ap, &len);