From 79e6f0e38a1c532e069246f79cc5ebe1189eb4e9 Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 19 Mar 2007 23:11:10 +0000 Subject: [PATCH] b=11013 This is a potential null pointer dereference. Caught by HEAD's conf_sanity test 29 --- lustre/ptlrpc/connection.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lustre/ptlrpc/connection.c b/lustre/ptlrpc/connection.c index 23acbd7..7c31d4a 100644 --- a/lustre/ptlrpc/connection.c +++ b/lustre/ptlrpc/connection.c @@ -135,7 +135,7 @@ out_conn: int ptlrpc_put_connection(struct ptlrpc_connection *c) { int rc = 0; - lnet_process_id_t peer = c->c_peer; + lnet_process_id_t peer; ENTRY; if (c == NULL) { @@ -143,6 +143,8 @@ int ptlrpc_put_connection(struct ptlrpc_connection *c) RETURN(0); } + peer = c->c_peer; + CDEBUG (D_INFO, "connection=%p refcount %d to %s\n", c, atomic_read(&c->c_refcount) - 1, libcfs_nid2str(c->c_peer.nid)); -- 1.8.3.1