summary refs log tree commit diff
path: root/nis/nss_nisplus/nisplus-netgrp.c
diff options
context:
space:
mode:
Diffstat (limited to 'nis/nss_nisplus/nisplus-netgrp.c')
-rw-r--r--nis/nss_nisplus/nisplus-netgrp.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/nis/nss_nisplus/nisplus-netgrp.c b/nis/nss_nisplus/nisplus-netgrp.c
index 831a13d891..2d5ddf084e 100644
--- a/nis/nss_nisplus/nisplus-netgrp.c
+++ b/nis/nss_nisplus/nisplus-netgrp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
 
@@ -153,7 +153,12 @@ _nss_nisplus_setnetgrent (const char *group, struct __netgrent *dummy)
 
   data = nis_list (buf, EXPAND_NAME, NULL, NULL);
 
-  if (niserr2nss (data->status) != NSS_STATUS_SUCCESS)
+  if (data == NULL)
+    {
+      __set_errno (ENOMEM);
+      status = NSS_STATUS_TRYAGAIN;
+    }
+  else if (niserr2nss (data->status) != NSS_STATUS_SUCCESS)
     {
       status = niserr2nss (data->status);
       nis_freeresult (data);