Skip to content

Commit

Permalink
Copy prov_name and prov_version when allocating new fi_info for incom…
Browse files Browse the repository at this point in the history
…ing connections. Use __fi_freeinfo() to prevent accessing fi->fabric_attr->prov_name when it is not set.

Signed-off-by: Arun C Ilango <arun.ilango@intel.com>
  • Loading branch information
Arun C Ilango committed Oct 2, 2014
1 parent 2d441eb commit 591b82d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion prov/verbs/src/fi_verbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1630,14 +1630,18 @@ fi_ibv_eq_cm_getinfo(struct fi_ibv_fabric *fab, struct rdma_cm_event *event)

if (!(fi->fabric_attr->name = strdup("RDMA")))
goto err;
if (!(fi->fabric_attr->prov_name = strdup("verbs")))
goto err;
fi->fabric_attr->prov_version = FI_VERSION(0, 7);

if (!(fi->domain_attr->name = strdup(event->id->verbs->device->name)))
goto err;

fi->datalen = sizeof event->id;
fi->data = event->id;
return fi;
err:
fi_freeinfo(fi);
__fi_freeinfo(fi);
return NULL;
}

Expand Down

0 comments on commit 591b82d

Please sign in to comment.