Signed-off-by: Hal Rosenstock <[email protected]> --- diff --git a/opensm/libvendor/osm_vendor_ibumad_sa.c b/opensm/libvendor/osm_vendor_ibumad_sa.c index 218cce2..24146a7 100644 --- a/opensm/libvendor/osm_vendor_ibumad_sa.c +++ b/opensm/libvendor/osm_vendor_ibumad_sa.c @@ -2,6 +2,7 @@ * Copyright (c) 2004-2008 Voltaire, Inc. All rights reserved. * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved. * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. + * Copyright (c) 2009 HNR Consulting. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU @@ -437,6 +438,13 @@ __osmv_send_sa_req(IN osmv_sa_bind_info_t * p_bind, p_madw->context.ni_context.node_guid */ p_query_req_copy = malloc(sizeof(*p_query_req_copy)); + if (!p_query_req_copy) { + OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 5511: " + "Unable to acquire memory for query copy\n"); + osm_mad_pool_put(p_bind->p_mad_pool, p_madw); + status = IB_INSUFFICIENT_RESOURCES; + goto Exit; + } *p_query_req_copy = *p_query_req; p_madw->context.ni_context.node_guid = (ib_net64_t) (long)p_query_req_copy; diff --git a/opensm/libvendor/osm_vendor_mlx_sa.c b/opensm/libvendor/osm_vendor_mlx_sa.c index 7bd5aea..23e16ea 100644 --- a/opensm/libvendor/osm_vendor_mlx_sa.c +++ b/opensm/libvendor/osm_vendor_mlx_sa.c @@ -2,6 +2,7 @@ * Copyright (c) 2004-2008 Voltaire, Inc. All rights reserved. * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved. * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. + * Copyright (c) 2009 HNR Consulting. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU @@ -552,6 +553,13 @@ __osmv_send_sa_req(IN osmv_sa_bind_info_t * p_bind, p_madw->context.arb_context.context1 */ p_query_req_copy = malloc(sizeof(*p_query_req_copy)); + if (!p_query_req_copy) { + OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 0511: " + "Unable to acquire memory for query copy\n"); + osm_mad_pool_put(p_bind->p_mad_pool, p_madw); + status = IB_INSUFFICIENT_RESOURCES; + goto Exit; + } *p_query_req_copy = *p_query_req; p_madw->context.arb_context.context1 = p_query_req_copy; _______________________________________________ general mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
