diff options
author | wpaul <wpaul@FreeBSD.org> | 1995-05-11 00:16:54 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 1995-05-11 00:16:54 +0000 |
commit | 7169c208224599b610407976dda740781dfc7fbf (patch) | |
tree | 0b5fac18d06840dcef61659bff3335f4678805d8 /usr.sbin/ypbind/ypbind.c | |
parent | 8b37bdba137aa56374be106198df1d9454562869 (diff) | |
download | FreeBSD-src-7169c208224599b610407976dda740781dfc7fbf.zip FreeBSD-src-7169c208224599b610407976dda740781dfc7fbf.tar.gz |
Ack! One slipped through the cracks: remember to return the correctly
filled-in result structure to the caller when a resource allocation
error is encountered in ypbindproc_domain_2.
Diffstat (limited to 'usr.sbin/ypbind/ypbind.c')
-rw-r--r-- | usr.sbin/ypbind/ypbind.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/ypbind/ypbind.c b/usr.sbin/ypbind/ypbind.c index e985e58..b95c673 100644 --- a/usr.sbin/ypbind/ypbind.c +++ b/usr.sbin/ypbind/ypbind.c @@ -149,17 +149,17 @@ CLIENT *clnt; break; if(ypdb==NULL) { - if (domains > MAX_DOMAINS) { + if (domains == MAX_DOMAINS) { syslog(LOG_WARNING, "domain limit (%d) exceeded", MAX_DOMAINS); res.ypbind_respbody.ypbind_error = YPBIND_ERR_RESC; - return; + return &res; } ypdb = (struct _dom_binding *)malloc(sizeof *ypdb); if (ypdb == NULL) { syslog(LOG_WARNING, "malloc: %s", strerror(errno)); res.ypbind_respbody.ypbind_error = YPBIND_ERR_RESC; - return; + return &res; } bzero((char *)ypdb, sizeof *ypdb); strncpy(ypdb->dom_domain, argp, sizeof ypdb->dom_domain); |