Free the cbuf after obtaining the error number. Signed-off-by: Frank Sorenson <sorenson@xxxxxxxxxx> --- src/clnt_dg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/clnt_dg.c b/src/clnt_dg.c index e1255de..b3d82e7 100644 --- a/src/clnt_dg.c +++ b/src/clnt_dg.c @@ -456,9 +456,9 @@ get_reply: cmsg = CMSG_NXTHDR (&msg, cmsg)) if (cmsg->cmsg_level == SOL_IP && cmsg->cmsg_type == IP_RECVERR) { - mem_free(cbuf, (outlen + 256)); e = (struct sock_extended_err *) CMSG_DATA(cmsg); cu->cu_error.re_errno = e->ee_errno; + mem_free(cbuf, (outlen + 256)); release_fd_lock(cu->cu_fd_lock, mask); return (cu->cu_error.re_status = RPC_CANTRECV); } -- 2.31.1