[openib-general] [PATCH] osm: fix memory leak in vendor ibumad
Eitan Zahavi
eitan at mellanox.co.il
Wed Aug 23 08:57:54 PDT 2006
Who is freeing the request MAD?
If it is NULL then the flow aborts earlier.
> -----Original Message-----
> From: Hal Rosenstock [mailto:halr at voltaire.com]
> Sent: Wednesday, August 23, 2006 6:35 PM
> To: Eitan Zahavi
> Cc: openib-general at openib.org
> Subject: Re: [PATCH] osm: fix memory leak in vendor ibumad
>
> 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