From c59402909451704c36f862fb2968f6c8e717df4c Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Wed, 30 Apr 2008 23:46:29 +0000 Subject: (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 --- src/krb524/krb524d.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/krb524/krb524d.c') 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; } -- cgit v1.1