aboutsummaryrefslogtreecommitdiff
path: root/sunrpc/key_call.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-05-16 10:14:25 +0000
committerUlrich Drepper <drepper@redhat.com>1999-05-16 10:14:25 +0000
commit32abdb710c9335481da780eab5ad790318d2fadf (patch)
tree70c94809f5ec43a895c614a445a32f4d18d925c5 /sunrpc/key_call.c
parent7d853c902b9f79a32c8c1921b16107648c15f0e3 (diff)
downloadglibc-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 'sunrpc/key_call.c')
-rw-r--r--sunrpc/key_call.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sunrpc/key_call.c b/sunrpc/key_call.c
index 5aef933cbf..2f4ca25d94 100644
--- a/sunrpc/key_call.c
+++ b/sunrpc/key_call.c
@@ -491,7 +491,7 @@ key_call_door (u_long proc, xdrproc_t xdr_arg, char *arg,
xdrproc_t xdr_rslt, char *rslt)
{
XDR xdrs;
- int fd;
+ int fd, ret;
door_arg_t args;
char *data_ptr;
u_long data_len = 0;
@@ -525,12 +525,13 @@ key_call_door (u_long proc, xdrproc_t xdr_arg, char *arg,
args.rbuf = res;
args.rsize = sizeof (res);
- if (__door_call (fd, &args) < 0)
- return 0;
-
+ ret = __door_call (fd, &args);
free (data_ptr);
close (fd);
+ if (ret < 0)
+ return 0;
+
memcpy (&data_len, args.data_ptr, sizeof (u_long));
if (data_len != 0)
return 0;