The xprt->xp_auth pointer need to be checked before
used in the SVCAUTH_WRAP call since it can be NULL
during error conditions.
Signed-off-by: Steve Dickson <steved@redhat.com>
XDR_SETPOS(xdrs, 0);
msg->rm_xid = su->su_xid;
if (xdr_replymsg(xdrs, msg) &&
- (!has_args ||
- (SVCAUTH_WRAP(xprt->xp_auth, xdrs, xdr_results, xdr_location)))) {
+ (!has_args || (xprt->xp_auth &&
+ SVCAUTH_WRAP(xprt->xp_auth, xdrs, xdr_results, xdr_location)))) {
struct msghdr *msg = &su->su_msghdr;
struct iovec iov;
msg->rm_xid = cd->x_id;
rstat = FALSE;
if (xdr_replymsg(xdrs, msg) &&
- (!has_args ||
- (SVCAUTH_WRAP(xprt->xp_auth, xdrs, xdr_results, xdr_location)))) {
+ (!has_args || (xprt->xp_auth &&
+ SVCAUTH_WRAP(xprt->xp_auth, xdrs, xdr_results, xdr_location)))) {
rstat = TRUE;
}
(void)xdrrec_endofrecord(xdrs, TRUE);