diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2009-06-05 17:20:32 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2009-06-05 17:20:32 +0000 |
commit | f4be2667e089ea7c32a5a0dbf8b3ebc144d09d24 (patch) | |
tree | 3199209037e0970d40863c0901831b467a2e33e0 /lib/libc | |
parent | 56fdb47bf3dde0a7a410f7d932703da9d12d696c (diff) |
malloc(3) failure should raise YPERR_RESRC, not YPERR_YPERR;
ok millert@
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/yp/ypmatch_cache.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/yp/ypmatch_cache.c b/lib/libc/yp/ypmatch_cache.c index 2c0df63e7cc..09318653d9c 100644 --- a/lib/libc/yp/ypmatch_cache.c +++ b/lib/libc/yp/ypmatch_cache.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ypmatch_cache.c,v 1.12 2005/08/05 13:02:16 espie Exp $ */ +/* $OpenBSD: ypmatch_cache.c,v 1.13 2009/06/05 17:20:31 schwarze Exp $ */ /* * Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com> * All rights reserved. @@ -171,7 +171,7 @@ again: *outvallen = yprv.val.valdat_len; if ((*outval = malloc(*outvallen + 1)) == NULL) { _yp_unbind(ysd); - return YPERR_YPERR; + return YPERR_RESRC; } (void)memcpy(*outval, yprv.val.valdat_val, *outvallen); (*outval)[*outvallen] = '\0'; @@ -201,7 +201,7 @@ again: if (!(r = ypprot_err(yprv.stat))) { *outvallen = yprv.val.valdat_len; if ((*outval = malloc(*outvallen + 1)) == NULL) { - r = YPERR_YPERR; + r = YPERR_RESRC; goto out; } (void)memcpy(*outval, yprv.val.valdat_val, *outvallen); |