[openib-general] [PATCH] osm: fix memory leak in vendor ibumad

Hal Rosenstock halr at voltaire.com
Wed Aug 23 08:35:11 PDT 2006


Hi Eitan,

I'm not getting openib-general email today but got this off a web site:

Index: libvendor/osm_vendor_ibumad_sa.c
===================================================================
--- libvendor/osm_vendor_ibumad_sa.c	(revision 9087)
+++ libvendor/osm_vendor_ibumad_sa.c	(working copy)
@@ -180,6 +180,11 @@ __osmv_sa_mad_rcv_cb(
 
   /* free the copied query request if found */
   if (p_query_req_copy) free(p_query_req_copy);
+
+  /* put back the request madw */
+  if (p_req_madw)
+    osm_mad_pool_put(p_bind->p_mad_pool, p_req_madw);
+
   OSM_LOG_EXIT( p_bind->p_log );
 }

There's an additional minor change needed to this routine as there is a
case where the request MAD is already free'd.

I'm in the process of looking at the osm_vendor_ibumad.c change too.

-- Hal





More information about the general mailing list