about summary refs log tree commit diff
path: root/nis/nis_ping.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-12-22 20:10:10 +0000
committerUlrich Drepper <drepper@redhat.com>2004-12-22 20:10:10 +0000
commita334319f6530564d22e775935d9c91663623a1b4 (patch)
treeb5877475619e4c938e98757d518bb1e9cbead751 /nis/nis_ping.c
parent0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (diff)
downloadglibc-a334319f6530564d22e775935d9c91663623a1b4.tar.gz
glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.xz
glibc-a334319f6530564d22e775935d9c91663623a1b4.zip
(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
Diffstat (limited to 'nis/nis_ping.c')
-rw-r--r--nis/nis_ping.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/nis/nis_ping.c b/nis/nis_ping.c
index 81afc5e8e3..d9924f9279 100644
--- a/nis/nis_ping.c
+++ b/nis/nis_ping.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 1997, 1998, 1999, 2006 Free Software Foundation, Inc.
+/* Copyright (c) 1997, 1998, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997.
 
@@ -39,7 +39,8 @@ nis_ping (const_nis_name dirname, unsigned int utime,
       res = nis_lookup (dirname, MASTER_ONLY);
       if (res == NULL || NIS_RES_STATUS (res) != NIS_SUCCESS)
 	{
-	  nis_freeresult (res);
+	  if (res)
+	    nis_freeresult (res);
 	  return;
 	}
       obj = res->objects.objects_val;
@@ -50,7 +51,8 @@ nis_ping (const_nis_name dirname, unsigned int utime,
   /* Check if obj is really a diryectory object */
   if (__type_of (obj) != NIS_DIRECTORY_OBJ)
     {
-      nis_freeresult (res);
+      if (res != NULL)
+	nis_freeresult (res);
       return;
     }
 
@@ -66,5 +68,6 @@ nis_ping (const_nis_name dirname, unsigned int utime,
 		   NIS_PING, (xdrproc_t) _xdr_ping_args,
 		   (caddr_t) &args, (xdrproc_t) xdr_void,
 		   (caddr_t) NULL, 0, NULL);
-  nis_freeresult (res);
+  if (res)
+    nis_freeresult (res);
 }