[openib-general] [PATCH] bad free() in libibumad
Hal Rosenstock
halr at voltaire.com
Tue Jan 10 03:49:05 PST 2006
On Mon, 2006-01-09 at 18:40, Hal Rosenstock wrote:
> Hi Ralph,
>
> On Mon, 2006-01-09 at 16:46, Ralph Campbell wrote:
> > 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;
> > }
>
> I think there is more to it than this but thanks for pointing this out.
Thanks. I applied your "better" version of this patch.
-- Hal
More information about the general
mailing list