Skip to content
Commit bf6b47de authored by Jesper Juhl's avatar Jesper Juhl Committed by Roland Dreier
Browse files

IB/mlx4: Fix memory leaks in ib_link_query_port()



If the call to mlx4_MAD_IFC() fails in ib_link_query_port() we will
currently do 'return err;' which will leak 'in_mad' and 'out_mad'.  We
should instead do 'goto out;' where we'll properly free the memory we
previously allocated.

Signed-off-by: default avatarJesper Juhl <jj@chaosbits.net>
Acked-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
parent 00341028
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment