[ofw] Patch:[IBBUS] Fix a memory leak

Tzachi Dar tzachid at mellanox.co.il
Wed Sep 1 03:20:20 PDT 2010


Applied in 2882.

Thanks
Tzachi

From: Smith, Stan [mailto:stan.smith at intel.com]
Sent: Tuesday, August 31, 2010 8:15 PM
To: Tzachi Dar; ofw at lists.openfabrics.org
Subject: RE: Patch:[IBBUS] Fix a memory leak

Looks good.

________________________________
From: ofw-bounces at lists.openfabrics.org [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Tzachi Dar
Sent: Tuesday, August 31, 2010 6:37 AM
To: ofw at lists.openfabrics.org
Subject: [ofw] Patch:[IBBUS] Fix a memory leak
(mlnx 5187) This memory leak was found while running with driver verifier

Index: B:/users/tzachid/projinf9/trunk/core/al/kernel/al_dev.c
===================================================================
--- B:/users/tzachid/projinf9/trunk/core/al/kernel/al_dev.c       (revision 5186)
+++ B:/users/tzachid/projinf9/trunk/core/al/kernel/al_dev.c    (revision 5187)
@@ -188,6 +188,7 @@
                if( cl_status != CL_SUCCESS )
                {
                                __destroy_open_context( p_context );
+                             cl_free( p_context );
                                return cl_status;
                }

@@ -214,6 +215,7 @@
                else
                {
                                __destroy_open_context( p_context );
+                             cl_free( p_context );
                                cl_status = CL_INSUFFICIENT_RESOURCES;
                }

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20100901/53635cb8/attachment.html>


More information about the ofw mailing list