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

Tzachi Dar tzachid at mellanox.co.il
Tue Aug 31 06:36:40 PDT 2010


(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/20100831/cb212615/attachment.html>


More information about the ofw mailing list