[openib-general] [PATCH] bad free() in libibumad

Ralph Campbell ralphc at pathscale.com
Mon Jan 9 13:46:52 PST 2006


Here is a patch to fix the following backtrace:

(gdb) bt
#0  0x000000355642f280 in raise () from /lib64/libc.so.6
#1  0x0000003556430750 in abort () from /lib64/libc.so.6
#2  0x0000003556464a7f in __libc_message () from /lib64/libc.so.6
#3  0x000000355646a71e in _int_free () from /lib64/libc.so.6
#4  0x000000355646ac4e in free () from /lib64/libc.so.6
#5  0x0000003d98f01568 in get_port (ca_name=Variable "ca_name" is not
available.) at src/umad.c:191
#6  0x0000003d98f025f5 in umad_get_port (
    ca_name=0x7fffff9d3e70 "/sys/class/infiniband/mthca0/ports",
portnum=1,
    port=0x7fffff9d44f0) at src/umad.c:617
#7  0x0000003d9910249a in osm_vendor_get_all_port_attr (p_vend=0x658220,
    p_attr_array=0x7fffff9d4580, p_num_ports=0x7fffff9d6a08)
    at osm_vendor_ibumad.c:624
#8  0x00000000004044e9 in get_port_guid (p_osm=Variable "p_osm" is not
available.
) at main.c:274


Signed-off-by: Ralph Campbell <ralphc at pathscale.com>

Index: libibumad/src/umad.c
===================================================================
--- libibumad/src/umad.c	(revision 4808)
+++ libibumad/src/umad.c	(working copy)
@@ -188,7 +188,6 @@
 	return 0;
 
 clean:
-	free(port);
 	return -EIO;
 }
 



-- 
Ralph Campbell <ralphc at pathscale.com>




More information about the general mailing list