From: shadow Date: Thu, 14 Jun 2007 08:56:42 +0000 (+0000) Subject: fix NULL pointer dereference X-Git-Tag: v1_8_0_110~1531 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=da8deccf2cc8e2acb5a9dc64e0acb397b7d018ed;p=fs%2Flustre-release.git fix NULL pointer dereference b=12731 i=vitaly (original author) i=adilger --- diff --git a/lustre/ptlrpc/client.c b/lustre/ptlrpc/client.c index d350ce0..a0ff87c 100644 --- a/lustre/ptlrpc/client.c +++ b/lustre/ptlrpc/client.c @@ -572,7 +572,9 @@ static int ptlrpc_check_status(struct ptlrpc_request *req) if (lustre_msg_get_type(req->rq_repmsg) == PTL_RPC_MSG_ERR) { LCONSOLE_ERROR_MSG(0x011, "an error ocurred while communicating" " with %s The %s operation failed with %d", - obd_export_nid2str(req->rq_export), + req->rq_export ? + obd_export_nid2str(req->rq_export) + : "(no nid)", ll_opcode2str(lustre_msg_get_opc(req->rq_reqmsg)), err); RETURN(err < 0 ? err : -EINVAL);