From: Jesper Juhl Date: Wed, 11 Apr 2012 21:43:29 +0000 (+0200) Subject: IB/mlx4: Fix memory leaks in ib_link_query_port() X-Git-Tag: v3.4-rc5~23^2^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf6b47deb40f9fc8ddb4573373dc9614aab59d35;p=pandora-kernel.git 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: Jesper Juhl Acked-by: Or Gerlitz Signed-off-by: Roland Dreier --- Reading git-diff-tree failed