aboutsummaryrefslogtreecommitdiff
path: root/src/lib/kdb/kdb5.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/lib/kdb/kdb5.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/lib/kdb/kdb5.c')
-rw-r--r--src/lib/kdb/kdb5.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/kdb/kdb5.c b/src/lib/kdb/kdb5.c
index 2b6ed2c..2a6b468 100644
--- a/src/lib/kdb/kdb5.c
+++ b/src/lib/kdb/kdb5.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2006 by the Massachusetts Institute of Technology.
+ * Copyright 2006, 2008 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
* Export of this software from the United States of America may
@@ -354,7 +354,7 @@ kdb_load_library(krb5_context kcontext, char *lib_name, db_library * lib)
path = calloc(ndx + db_dl_n_locations, sizeof (char *));
if (path == NULL) {
- status = errno;
+ status = ENOMEM;
goto clean_n_exit;
}
if (ndx)