diff options
Diffstat (limited to 'lib/libc/rpc')
-rw-r--r-- | lib/libc/rpc/rpcb_prot.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/rpc/rpcb_prot.c b/lib/libc/rpc/rpcb_prot.c index 17dc375..5c199d8 100644 --- a/lib/libc/rpc/rpcb_prot.c +++ b/lib/libc/rpc/rpcb_prot.c @@ -129,7 +129,7 @@ xdr_rpcblist_ptr(xdrs, rp) * the case of freeing we must remember the next object * before we free the current object ... */ - if (freeing) + if (freeing && *rp) next = (*rp)->rpcb_next; if (! xdr_reference(xdrs, (caddr_t *)rp, (u_int)sizeof (rpcblist), (xdrproc_t)xdr_rpcb)) { @@ -143,7 +143,7 @@ xdr_rpcblist_ptr(xdrs, rp) * gets nulled out by the xdr_reference * but next itself survives. */ - } else { + } else if (*rp) { rp = &((*rp)->rpcb_next); } } @@ -225,7 +225,7 @@ xdr_rpcb_entry_list_ptr(xdrs, rp) (xdrproc_t)xdr_rpcb_entry)) { return (FALSE); } - if (freeing) { + if (freeing && *rp) { next_copy = next; rp = &next_copy; /* @@ -233,7 +233,7 @@ xdr_rpcb_entry_list_ptr(xdrs, rp) * gets nulled out by the xdr_reference * but next itself survives. */ - } else { + } else if (*rp) { rp = &((*rp)->rpcb_entry_next); } } |