infiniband-diags/ibqueryerrors: Properly exit and clean up resources when node info query fails
PATCH 2/2 infiniband-diags/ibqueryerrors: Properly exit and clean up resources when node info query fails
From: Ira Weiny <[email protected]>
Date: Tue, 3 Nov 2009 20:17:14 -0800
Subject: [PATCH] infiniband-diags/ibqueryerrors: Properly exit and clean up resources when node info query fails
--- infiniband-diags/src/ibqueryerrors.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
infiniband-diags/src/ibqueryerrors.c +5 -2
@@ -559,8 +559,10 @@ int main(int argc, char **argv)uint8_t ni[IB_SMP_DATA_SIZE ];if (!smp_query_via (ni, &portid,IB_ATTR_NODE_INFO ,0 , - ibd_timeout, ibmad_port)) -return -1 ; + ibd_timeout, ibmad_port)) { + rc =-1 ; + goto destroy_fabric; + }mad_decode_field (ni,IB_NODE_GUID_F , &(node_guid)); node =ibnd_find_node_guid (fabric, node_guid);
@@ -571,6 +573,7 @@ int main(int argc, char **argv) }else ibnd_iter_nodes (fabric, print_node,NULL ); +destroy_fabric:ibnd_destroy_fabric (fabric); close_port:
Signature · 6 lines
1.5.4.5 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Sasha Khapyorsky
AppliedQuoted 7 lines · Ira Weiny
From: Ira Weiny <[email protected]>
Date: Tue, 3 Nov 2009 20:17:14 -0800
Subject: [PATCH] infiniband-diags/ibqueryerrors: Properly exit and clean up resources when node info query failsSigned-off-by Ira Weiny <[email protected]>
Applied. Thanks.
Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html