[ofw] [patch][tools][vstat] vstat memory leak

Irena Gannon irena at mellanox.co.il
Tue Nov 30 04:51:54 PST 2010


Signed-off-by: Irena Gannon (irena at mellanox.co.il<mailto:irena at mellanox.co.il>)

This patch fixes a memory leak reported by the debugger:

                *** Memory Usage ***
                Memory block at 0000000000A45E30 allocated in file s:\builds\6949\trunk\tools\vstat\user\vstat_main.c line 527
                Memory block at 0000000001700550 allocated in file s:\builds\6949\trunk\tools\vstat\user\vstat_main.c line 530
*** End of Memory Usage ***

Index: B:/users/irena/proj1/trunk/tools/vstat/user/vstat_main.c
===================================================================
--- B:/users/irena/proj1/trunk/tools/vstat/user/vstat_main.c    (revision 6951)
+++ B:/users/irena/proj1/trunk/tools/vstat/user/vstat_main.c (revision 6952)
@@ -548,6 +548,8 @@

                cl_memcpy(vstat_port_info,(ib_port_info_t*)(((ib_smp_t*)mad_out)->data),sizeof(ib_port_info_t));

+             cl_free(mad_out);
+             cl_free(mad_in);

 }

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20101130/7da484f2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vstat_mem.patch
Type: application/octet-stream
Size: 467 bytes
Desc: vstat_mem.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20101130/7da484f2/attachment.obj>


More information about the ofw mailing list