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.
*
@@ -87,8 +87,10 @@ krb5_mk_priv(krb5_context context,
buf_size = 1024;
buf = malloc (buf_size);
if (buf == NULL)
if (buf == NULL) {
krb5_set_error_string (context, "malloc: out of memory");
return ENOMEM;
}
krb5_data_zero (&s.enc_part.cipher);
@@ -102,6 +104,7 @@ krb5_mk_priv(krb5_context context,
buf_size *= 2;
tmp = realloc (buf, buf_size);
if (tmp == NULL) {
krb5_set_error_string (context, "malloc: out of memory");
ret = ENOMEM;
goto fail;
}
@@ -144,6 +147,7 @@ krb5_mk_priv(krb5_context context,
buf_size *= 2;
tmp = realloc (buf, buf_size);
if (tmp == NULL) {
krb5_set_error_string (context, "malloc: out of memory");
ret = ENOMEM;
goto fail;
}
@@ -158,6 +162,7 @@ krb5_mk_priv(krb5_context context,
outbuf->length = len;
outbuf->data = malloc (len);
if (outbuf->data == NULL) {
krb5_set_error_string (context, "malloc: out of memory");
free(buf);
return ENOMEM;
}