This can help with finding use after free issues if memory not reused updn and lash rely on this priv pointer and may have stale osm_switch_t pointers
Signed-off-by: Hal Rosenstock <[email protected]> --- diff --git a/opensm/opensm/osm_switch.c b/opensm/opensm/osm_switch.c index ce1ca63..e23b32f 100644 --- a/opensm/opensm/osm_switch.c +++ b/opensm/opensm/osm_switch.c @@ -94,6 +94,7 @@ void osm_switch_delete(IN OUT osm_switch_t ** const pp_sw) free(p_sw->hops[i]); free(p_sw->hops); } + p_sw->priv = NULL; free(*pp_sw); *pp_sw = NULL; } _______________________________________________ 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
