aboutsummaryrefslogtreecommitdiff
path: root/nis/nis_lookup.c
diff options
context:
space:
mode:
Diffstat (limited to 'nis/nis_lookup.c')
-rw-r--r--nis/nis_lookup.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/nis/nis_lookup.c b/nis/nis_lookup.c
index 4eed61ecdc..cdc5b3f1f9 100644
--- a/nis/nis_lookup.c
+++ b/nis/nis_lookup.c
@@ -121,14 +121,14 @@ nis_lookup (const_nis_name name, const unsigned int flags)
++count_links;
req.ns_name =
strdup (NIS_RES_OBJECT (res)->LI_data.li_name);
+ if (req.ns_name == NULL)
+ return NULL;
+
nis_freeresult (res);
res = calloc (1, sizeof (nis_result));
if (res == NULL)
- {
- __nisbind_destroy (&bptr);
- nis_free_directory (dir);
- return NULL;
- }
+ return NULL;
+
link_first_try = 1; /* Try at first the old binding */
goto again;
}