diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-05-16 10:14:25 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-05-16 10:14:25 +0000 |
commit | 32abdb710c9335481da780eab5ad790318d2fadf (patch) | |
tree | 70c94809f5ec43a895c614a445a32f4d18d925c5 /nis/nis_ping.c | |
parent | 7d853c902b9f79a32c8c1921b16107648c15f0e3 (diff) | |
download | glibc-32abdb710c9335481da780eab5ad790318d2fadf.tar glibc-32abdb710c9335481da780eab5ad790318d2fadf.tar.gz glibc-32abdb710c9335481da780eab5ad790318d2fadf.tar.bz2 glibc-32abdb710c9335481da780eab5ad790318d2fadf.zip |
Update.
1999-05-16 Thorsten Kukuk <kukuk@suse.de>
* sunrpc/etc.rpc: Add portmapper, rstat_svc and pcnfs.
* sunrpc/key_call.c: Fix memory leak, close file handle.
* nis/nis_creategroup.c: Use malloc instead of calloc,
set ctime and mtime.
* nis/nis_subr.c: Check for realloc result.
* nis/nis_file.c: Fix memory leak.
* nis/nis_table.c: Pretty print.
* nis/nis_getservlist.c: Likewise.
* nis/nis_ismember.c: Likewise.
* nis/nis_lookup.c: Likewise.
* nis/nis_ping.c: Likewise.
* nis/nis_removemember.c: Likewise.
* nis/nis_util.c: Likewise, check calloc result.
Diffstat (limited to 'nis/nis_ping.c')
-rw-r--r-- | nis/nis_ping.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/nis/nis_ping.c b/nis/nis_ping.c index bc6db38e93..7e20716173 100644 --- a/nis/nis_ping.c +++ b/nis/nis_ping.c @@ -1,6 +1,6 @@ -/* Copyright (c) 1997, 1998 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@vt.uni-paderborn.de>, 1997. + Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as @@ -37,8 +37,12 @@ nis_ping (const_nis_name dirname, unsigned int utime, if (dirobj == NULL) { res = nis_lookup (dirname, MASTER_ONLY); - if (NIS_RES_STATUS (res) != NIS_SUCCESS) - return; + if (res == NULL || NIS_RES_STATUS (res) != NIS_SUCCESS) + { + if (res) + nis_freeresult (res); + return; + } obj = res->objects.objects_val; } else |