diff mbox

[1/1] ibacm: Incorrect return value check in path resolution

Message ID 1405621959-31295-1-git-send-email-kaike.wan@intel.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Wan, Kaike July 17, 2014, 6:32 p.m. UTC
From: Kaike Wan <kaike.wan@intel.com>

The returned variable "addr" should be checked instead of the variable "ep" in
the function acm_svr_resolve_path() when query parameters are given in a path
record (eg, slid/dlid, sgid/dgid, etc).

Signed-off-by: Kaike Wan <kaike.wan@intel.com>
---
 src/acm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Hefty, Sean July 17, 2014, 8:16 p.m. UTC | #1
thanks - merged
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/src/acm.c b/src/acm.c
index fae9d0b..11fda4c 100644
--- a/src/acm.c
+++ b/src/acm.c
@@ -946,7 +946,7 @@  acm_svr_resolve_path(struct acmc_client *client, struct acm_msg *msg)
 		msg->resolve_data[0].info.addr, sizeof *path);
 	acm_log(2, "path %s\n", log_data);
 	addr = acm_get_ep_address(&msg->resolve_data[0]);
-	if (!ep) {
+	if (!addr) {
 		acm_log(0, "notice - unknown local end point address\n");
 		return acmc_resolve_response(client->index, msg,
 					     ACM_STATUS_ESRCADDR);