summaryrefslogtreecommitdiffstats
path: root/src/lib/krb5/os/changepw.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/krb5/os/changepw.c
parentec5b9670de4c7af9ebaecfbd305857ee030460c0 (diff)
downloadkrb5-c59402909451704c36f862fb2968f6c8e717df4c.tar.gz
krb5-c59402909451704c36f862fb2968f6c8e717df4c.tar.xz
krb5-c59402909451704c36f862fb2968f6c8e717df4c.zip
(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/krb5/os/changepw.c')
-rw-r--r--src/lib/krb5/os/changepw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/krb5/os/changepw.c b/src/lib/krb5/os/changepw.c
index 816713dc4..275f61a63 100644
--- a/src/lib/krb5/os/changepw.c
+++ b/src/lib/krb5/os/changepw.c
@@ -1,7 +1,7 @@
/*
* lib/krb5/os/changepw.c
*
- * Copyright 1990,1999,2001 by the Massachusetts Institute of Technology.
+ * Copyright 1990,1999,2001,2008 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
* Export of this software from the United States of America may
@@ -139,7 +139,7 @@ static int kpasswd_sendto_msg_callback(struct conn_state *conn, void *callback_c
local_kaddr.length = addrs[0]->length;
local_kaddr.contents = malloc(addrs[0]->length);
if (local_kaddr.contents == NULL && addrs[0]->length != 0) {
- code = errno;
+ code = ENOMEM;
krb5_free_addresses(ctx->context, addrs);
goto cleanup;
}