aboutsummaryrefslogtreecommitdiff
path: root/src/krb524/krb524d.c
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2008-04-30 23:46:29 +0000
committerKen Raeburn <raeburn@mit.edu>2008-04-30 23:46:29 +0000
commitc59402909451704c36f862fb2968f6c8e717df4c (patch)
tree6d07f526934e50b795e8b7201e5be0c2e6473b8a /src/krb524/krb524d.c
parentec5b9670de4c7af9ebaecfbd305857ee030460c0 (diff)
downloadkrb5-c59402909451704c36f862fb2968f6c8e717df4c.zip
krb5-c59402909451704c36f862fb2968f6c8e717df4c.tar.gz
krb5-c59402909451704c36f862fb2968f6c8e717df4c.tar.bz2
(more) After malloc/realloc/calloc/strdup/asprintf failures, use
ENOMEM explicitly instead of reading it from errno. This may make static analysis tools less confused about when we return zero vs nonzero values. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20313 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/krb524/krb524d.c')
-rw-r--r--src/krb524/krb524d.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/krb524/krb524d.c b/src/krb524/krb524d.c
index c33efa3..202cda9 100644
--- a/src/krb524/krb524d.c
+++ b/src/krb524/krb524d.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2002, 2007 by the Massachusetts Institute of Technology.
+ * Copyright (C) 2002, 2007, 2008 by the Massachusetts Institute of Technology.
* All rights reserved.
*
* Export of this software from the United States of America may
@@ -462,7 +462,7 @@ krb5_error_code lookup_service_key(context, p, ktype, kvno, key, kvnop)
memcpy(key->contents, entry.key.contents, key->length);
else if (key->length) {
/* out of memory? */
- ret = errno;
+ ret = ENOMEM;
memset (key, 0, sizeof (*key));
return ret;
}