diff options
Diffstat (limited to 'lib/libc/rpc/clnt_raw.c')
-rw-r--r-- | lib/libc/rpc/clnt_raw.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/libc/rpc/clnt_raw.c b/lib/libc/rpc/clnt_raw.c index e9cf2455f89..9885f0878ec 100644 --- a/lib/libc/rpc/clnt_raw.c +++ b/lib/libc/rpc/clnt_raw.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: clnt_raw.c,v 1.5 1996/12/14 06:49:41 tholo Exp $"; +static char *rcsid = "$OpenBSD: clnt_raw.c,v 1.6 1997/11/05 10:00:20 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -170,8 +170,15 @@ call_again: msg.acpted_rply.ar_verf = _null_auth; msg.acpted_rply.ar_results.where = resultsp; msg.acpted_rply.ar_results.proc = xresults; - if (! xdr_replymsg(xdrs, &msg)) + if (! xdr_replymsg(xdrs, &msg)) { + /* xdr_replymsg() may have left some things allocated */ + int op = reply_xdrs.x_op; + reply_xdrs.x_op = XDR_FREE; + xdr_replymsg(&reply_xdrs, &reply_msg); + reply_xdrs.x_op = op; + cu->cu_error.re_status = RPC_CANTDECODERES; return (RPC_CANTDECODERES); + } _seterr_reply(&msg, &error); status = error.re_status; |